Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Converting Hashes to Objects

by haukex (Archbishop)
on May 17, 2020 at 14:07 UTC ( [id://11116853]=note: print w/replies, xml ) Need Help??


in reply to Re: Converting Hashes to Objects
in thread Converting Hashes to Objects

I like the idea, but dislike the name. H2O is water and nothing else :-)

I like the name, at the moment I don't think I'll change it ;-)

The objects are still hashrefs, you can still do keys %$hash etc.

Replies are listed 'Best First'.
Re^3: Converting Hashes to Objects
by jo37 (Deacon) on May 17, 2020 at 14:25 UTC

    Maybe something for the perldoc: keys must be valid Perl identifiers if accessed via this module.

    Greetings,
    -jo

    $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
      keys must be valid Perl identifiers if accessed via this module.

      Good point, thanks, done.

      Other methods can still be called with trickery, but of course that's not really the point of this module :-)

      use Util::H2O; my $o = h2o { '$%@.?' => 123 }; my $meth = '$%@.?'; print $o->$meth; # prints 123

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11116853]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found