in reply to Exporter 5.6.0
Apparently 5.6.0 added some layer of foolproofing. ;-)
I see a couple problems here. First of all, you're doing a 'require Exporter' instead of 'use Exporter'. Also, it may not like the double-export of header from CGI. Try this:
package foo; BEGIN { use Exporter; our(@ISA, @EXPORT); # use vars has been depreciated @ISA = qw(Exporter); @EXPORT = qw(header); } sub header { use CGI; # using OO-syntax for CGI.pm allows you the greatest flexibility my $cgi = new CGI; return $cgi->header; } 1;
Your other file should remain unchanged.
If you're creating a package like this, I would suggest reading the following manpages:
Alakaboo
I am the lurker that spams in the night.
|
|---|