in reply to Re^2: comments break my code
in thread comments break my code
Hi,
A thing that has nothing to do with your problem, but I won't use the indirect method call when you're not dealing with OO. Tester::Test->test() Because that way your first argument in the @_ array will be the Package name 'Tester::Test'.
Use the normal method Tester::Test::test() or use the Exporter module to import the subroutines into your namespace.
Tester::Test.pmt.plpackage Tester::Test; use strict; use Exporter qw/ import /; our @EXPORT_OK = qw/ test /; sub test{ print "test"; } 1;
#!/usr/bin/perl -w use strict; use CGI; use Tester::Test qw/test/; # if you want to import it into your namesp +ace Tester::Test::test(); # or directly test() if you have imported it exit;
Regards,
|
|---|