Skip Menu |

This queue is for tickets about the Data-JavaScript-Anon CPAN distribution.

Report information
The Basics
Id: 17548
Status: resolved
Priority: 0/
Queue: Data-JavaScript-Anon

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

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



Subject: importing UNIVERSAL::isa breaks some Exporter modules
I'm not quite sure *how* this is accomplished, but using this module along with some internal code at my job causes bizarre and fatal compile-time errors (perl 5.6.1, Linux). I traced the problem to the '"use UNIVERSAL 'isa'" statement: replacing it with equivalent typeglob assignment, as suggested in the UNIVERSAL perldocs, resolved the problem. Trivial patch attached. If you're curious about the core problem, it appears to turn up in circular-import situations, but I confess I haven't looked all that closely at the mechanism. (Meant to, but haven't had time.)
Subject: universal_patch.txt
--- /usr/people/bwarf/.cpan/build/Data-JavaScript-Anon-0.6/lib/Data/JavaScript/Anon.pm 2005-07-26 04:48:34.000000000 -0400 +++ /usr/people/bwarf/lib/site_perl/5.6.1/Data/JavaScript/Anon.pm 2005-08-11 18:04:51.000000000 -0400 @@ -5,8 +5,7 @@ # from Perl to JavaScript. use strict; -use UNIVERSAL 'isa'; - +*isa = \&UNIVERSAL::isa; use vars qw{$VERSION $errstr $RE_NUMERIC $RE_NUMERIC_HASHKEY %KEYWORD}; BEGIN { $VERSION = '0.6';
Subject: Re: [rt.cpan.org #17548] importing UNIVERSAL::isa breaks some Exporter modules
Date: Thu, 09 Feb 2006 13:33:32 +1100
To: bug-Data-JavaScript-Anon [...] rt.cpan.org
From: Adam Kennedy <adam [...] phase-n.com>
Importing isa shouldn't be done at all. If necesary, move to using Params::Util::_INSTANCE instead Adam K Benjamin Warfield via RT wrote: Show quoted text
> Wed Feb 08 21:15:50 2006: Request 17548 was acted upon. > Transaction: Ticket created by BWARFIELD > Queue: Data-JavaScript-Anon > Subject: importing UNIVERSAL::isa breaks some Exporter modules > Owner: Nobody > Requestors: BWARFIELD@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17548 > > > > I'm not quite sure *how* this is accomplished, but using this module > along with some internal code at my job causes bizarre and fatal > compile-time errors (perl 5.6.1, Linux). I traced the problem to the > '"use UNIVERSAL 'isa'" statement: replacing it with equivalent typeglob > assignment, as suggested in the UNIVERSAL perldocs, resolved the > problem. Trivial patch attached. > > If you're curious about the core problem, it appears to turn up in > circular-import situations, but I confess I haven't looked all that > closely at the mechanism. (Meant to, but haven't had time.)