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