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:

I've also found Damian Conway's Object Oriented Perl to be an excellent read. The first four chapters will give you a crash course in strict Perl syntax, and give you all you need to know to get started with object orientedness in Perl. The rest of the book will help you streamline and `nicefy' your application.

Alakaboo
I am the lurker that spams in the night.