Subject: | importing not working, maybe |
I'ld rather believe this is a bug in Spiffy, than a bug in perl, but how
is it possible that two->can('function') but inside package two,
function(); generates an error?
Sorry to add more problems to your life, but remember one of my favorite
sayings: No good deed will go unpunished. Thus you are rewarded for
creating such a "Spiffy" module.
Best wishes,
Henry Laxen
perl -v
This is perl, v5.8.7 built for i486-linux-gnu-thread-multi
(with 1 registered patch, see perl -V for more detail)
uname -a
Linux exxor 2.6.15.4 #1 PREEMPT Thu Feb 16 06:43:48 MST 2006 i686 GNU/Linux
Subject: | spiffy_bug.pl |
#!/usr/bin/perl
package one;
use Class::Spiffy -base;
our @EXPORT = qw(function);
sub function { print "Function in package one\n" }
package two;
@two::ISA = qw(one);
print STDERR "Class::Spiffy version is ", $Class::Spiffy::VERSION, "\n";
print STDERR "Can two function? ",two->can('function'), "\n";
function();
__END__
cd /home/henry/dev/
/usr/bin/perl -w /home/henry/dev/spiffy_bug.pl
Class::Spiffy version is 0.15
Can two function? CODE(0x814b738)
Undefined subroutine &two::function called at /home/henry/dev/spiffy_bug.pl line 12.
Compilation exited abnormally with code 255 at Mon Feb 20 13:34:34