does this differ from Hash::AsObject
Yes, since that uses AUTOLOAD, which means it doesn't provide full typo prevention:
use Hash::AsObject; my $h = Hash::AsObject->new( foo => "bar" ); print $h->fOo, "\n"; # warning about undef use Util::H2O; my $o = h2o { foo => "bar" }; print $o->fOo, "\n"; # dies
Plus Util::H2O has the extra goodies like custom methods that I wrote about.
In reply to Re^2: Converting Hashes to Objects
by haukex
in thread Converting Hashes to Objects
by haukex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |