January 2023 Archives

Util::H2O and More, during Ordinary Times


During the 2022 Perl Advent, in particular the entry for December 06; Perl Advent fans were introduced to a little module called Util::H2O.

A lot has already been said about Util::H2O, and this author uses it a lot in client and production code because it helps produce very clean and maintainable HASH reference heavy code. So much so, that he created the Util::H2O::More module to encapsulate some common tasks and additional capabilities for working between pure Perl data structures and blessed objects that have real data accessors, in a natural and idiomatic way.

Support for Generic Perl Data Structures

h2o is perfect for dealing with data structures that are made up of strictly HASH references, but it is often the case that useful data structures contain a mix of HASH and ARRAY references. For example, when using databases or web API calls returning JSON, it is often a list of records that is returned. This was the case of the example call that was in the December 06 Perl Advent 2022 article.

About Oodler 577

user-pic Mayor of Falvortown