Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the autobox CPAN distribution.

Report information
The Basics
Id: 55565
Status: resolved
Priority: 0/
Queue: autobox

People
Owner: CHOCOLATE [...] cpan.org
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.55
Fixed in: (no value)



Subject: autobox breaks $class->can($func)
autobox hijacks UNIVERSAL::can in such a way that calling can() on a scalar containing a class name no longer works. It instead treats it as an autoboxed scalar. $ perl -wle 'use CGI; print "CGI"->can("new")' CODE(0x84fe8c) $ perl -wle 'use CGI; use autobox; print "CGI"->can("new")' Use of uninitialized value in print at -e line 1. I'd recommend resolving this ambiguity in favor of $class->can so that autobox can safely be dropped into existing code and instead provide autobox_can() and autobox_isa() to resolve the ambiguity.
Good call. This should be fixed in autobox 2.60. chocolateboy
FYI: this is re-fixed in 2.70 to expose can, isa, VERSION et al. via autobox_class.