Hash::AsObject is now available from CPAN.
$h = Hash::AsObject->new(%myhash);
$h->foo(123);
print $h->foo; # 123
It's all implemented in AUTOLOAD so there are absolutely no verboten keys. All is permitted - even new, AUTOLOAD, and DESTROY may be used as accessors/mutators.
Oops. Dang. My tests weren't checking for VERSION, can, import, and isa. (*Sigh*). And I always wondered why I kept seeing people uploading two or more versions of the same distribution on the same day...
New module released. Bugs found. Argh! 0 Comments More | Login | Reply /