Skip Menu |

This queue is for tickets about the Class-Generate CPAN distribution.

Report information
The Basics
Id: 27445
Status: resolved
Priority: 0/
Queue: Class-Generate

People
Owner: Nobody in particular
Requestors: roman.yepishev [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.12



Subject: Recursive class declaration - @ISA is not accessible
Date: Tue, 5 Jun 2007 14:35:30 +0300
To: bug-Class-Generate [...] rt.cpan.org
From: "Roman Yepishev" <roman.yepishev [...] gmail.com>
Hello, Class::Generate Version 1.08 Tested with perl 5.8.8 @ linux and freebsd The code below dies, however normal top level classes are able to reference their @ISA. Subclass "SubTest", method "ISA": Global symbol "@ISA" requires explicit package name at line 1. at (eval 2) line 22 Subclass "SubTest": Cannot continue after errors at (eval 2) line 22 #!/usr/bin/perl use lib '.'; use Class::Generate qw(class subclass); class Test => [ '&createNewClass' => q! subclass SubTest => [ '&ISA' => 'return @ISA;' ], -parent => 'Test'; ! ], -use=>['Class::Generate qw(class subclass)'] ; my $d = Test->new(); $d->createNewClass(); # Error -- Regards, Roman Yepishev
On Tue Jun 05 07:35:53 2007, roman.yepishev@gmail.com wrote: Show quoted text
> Hello, > > Class::Generate Version 1.08 > Tested with perl 5.8.8 @ linux and freebsd > > The code below dies, however normal top level classes are able to reference > their @ISA. > > Subclass "SubTest", method "ISA": Global symbol "@ISA" requires explicit > package name at line 1. > at (eval 2) line 22 > Subclass "SubTest": Cannot continue after errors at (eval 2) line 22 > > #!/usr/bin/perl > > use lib '.'; > use Class::Generate qw(class subclass); > > class Test => [ > '&createNewClass' => q! > subclass SubTest => [ '&ISA' => 'return @ISA;' ], > -parent => 'Test'; > ! > ], > -use=>['Class::Generate qw(class subclass)'] > ; > > my $d = Test->new(); > $d->createNewClass(); # Error >
Hi, thanks for the report. This seems to be OK in Class-Generate-1.12 , but I added a regression test ( «t/rt27445.t» ) based on your code just in case. RESOLVEing this ticket until further notice. Regards, -- Shlomi Fish