Subject: | Sometimes, a package won't be an Exporter if @ISA is ordered wrong |
Date: | Wed, 14 Apr 2010 19:57:22 -0700 (PDT) |
To: | bug-Exporter [...] rt.cpan.org |
From: | David Tindall Mcmath <mcdave [...] stanford.edu> |
The attached test.pl script produces the following output:
--
McDaves-MacBook-Pro:~ mcdave$ perl test.pl
It works
It works
Undefined subroutine &main::testbiz called at test.pl line 19.
It works
--
I expected it to write "It works" four times. With @ISA=qw(CGI Exporter), the exported function doesn't seem to get out into main.
It's not the best style, but it happens to mirror the code where I actually noticed the problem first. I don't know whether it's a problem with Exporter or base. It seems odd that CGI and Class::DBI would have different behavior but I really don't know much about that sort of thing.
Thanks for any help you can offer,
dave
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.