Hi:
Here is a simple problem that's driving me nuts. I swear, I read the code n
times already.
############### A. pm #####################
#!/usr/bin/perl
use Exporter;
package A;
our @ISA=("Exporter");
our @EXPORT=qw(a);
our $egg="ludwig";
sub a
{
print "A...\n";
}
return 1;
######################### B.pm ########################
#!/usr/bin/perl
use Exporter;
package B;
our @ISA=("Exporter");
our @EXPORT=qw(b);
sub b
{
print "b!...\n";
}
return 1;
######################## x2.pl ######################
#!/usr/bin/perl
use B;
use A;
print "${A::egg}\n";
a();
b();
###################### Output ###################
[ora...@falcondev test]$ ./x2.pl
ludwig
A...
Undefined subroutine &main::b called at ./x2.pl line 8.
Is there a good way of preventing this. I'm sure that EXPORT, ISA and Exporter
are spelled
correctly!
I even run perl -cw on B.pm
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph