Hi all!
Can someone pls explain the problem here :
I am using MyModule.pm and the problem is coming as per i have explained below
MyModule.pm
package MyModule;
use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = (); @EXPORT_OK = qw(&func1 &func2); %EXPORT_TAGS = ( DEFAULT => [qw(&func1)], Both => [qw(&func1 &func2)]);
sub func1 { return reverse @_ } sub func2 { return map{ uc [EMAIL PROTECTED] }
1;
MyScript.pl (A simple script to use MyModule)
#!/usr/bin/perl -w
use strict;
# you may need to set @INC here (see below)
my @list = qw (J u s t ~ A n o t h e r ~ P e r l ~ H a c k e r !);
# case 3 use MyModule qw(:DEFAULT); print func1(@list),"\n"; print func2(@list),"\n";
Undefined subroutine &main::func1 called at test.pl line 22.
The ':DEFAULT' tag *should* export &func1 so you might expect the error here to concern a missing &func2. In fact Perl complains about &func1.
Looking forward for your responses...
Thanks in advance.
Regards,
Anish
_________________________________________________________________
Best of Indian handicrafts. http://www.fabmall.com/affiliatehtml/redir/nl8.asp At MSN Shopping.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>