Subject: | Allow subclassing |
When calling the class' constructor the returned object is blessed into
the Hash::AsObject class:
return bless $elems, __PACKAGE__;
This breaks subclassing:
package Foo;
use base qw/Hash::AsObject/;
package main;
die unless ref Foo->new eq 'Foo';
A way to solve this problem is changing the first code snippet to
something like:
return bless $elems, $self;
as $self contains the class name the new method was invoked on.
If you want me to I can provide a patch with the above fix as well as
some tests for it.