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

Owner: Nobody in particular
Requestors: nkuitse [...]

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

Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
Subject: Improper handling of special methods
X-RT-Original-Encoding: iso-8859-1
Content-Length: 488
Download (untitled) / with headers
text/plain 488b
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.

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

Please report any issues with to