Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: nkuitse [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.04
Fixed in: (no value)



Subject: Improper handling of special methods
AUTOLOAD() doesn't emulate can(), isa(), VERSION(), and import() properly. (Actually, I'm not sure it needs to handle VERSION() specially.) The proper solution requires handling class and instance calls differently. Right now they do this: $code = Hash::AsObject::can('bar'); # ERROR (dies) - should return a closure $code = Hash::AsObject->new->can('bar'); # OK - returns 'bar' Simplest solution: define methods can(), isa(), VERSION(), and import(). Oh, and probably DESTROY() too.