Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Perl OOP (POOP) - a use case for Util::H2O (hash to object)

by perlfan (Vicar)
on Jul 08, 2021 at 16:43 UTC ( [id://11134803]=note: print w/replies, xml ) Need Help??


in reply to Perl OOP (POOP) - a use case for Util::H2O (hash to object)

Follow up, two more "use cases" that I've come to appreciate Util::H2O for simplifying:
  • Resulting scrape object via Web::Scraper
  • Processing the results retrieved from DBI's selectall_arrayref
In all cases, above, it's pretty clear that the primary benefit of Util::H2O's h2o is in providing accessors for ad hoc hash references and being able to treat them as objects during a program in flight. One improvement would be to say, if this key is not defined, return 'undef'. Which is the point of a current feature request on the GH issues list for this module.

Log In?
Username:
Password:

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

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

    No recent polls found