Skip Menu |
 

This queue is for tickets about the Hash-AsObject CPAN distribution.

Report information
The Basics
Id: 32140
Status: resolved
Priority: 0/
Queue: Hash-AsObject

People
Owner: nkuitse [...] cpan.org
Requestors: rafl [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.09
Fixed in: (no value)



Subject: Allow subclassing
Download (untitled) / with headers
text/plain 529b
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.
Fixed in 0.10. Thanks for reporting!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.