Martin Barth 写道:
Well the code looks ok.
I just wrote some simple test code to do the same thing like you, but
it worked as exepcted. Are there some differeces between that example
and your code?
HTH
% ls
Module.pm test.pl
% cat Module.pm
#!/usr/bin/perl -w
use strict;
require Exporter;
our @ISA = qw/Exporter/;
our @EXPORT = qw/do_sth/;
sub do_sth {
print "done\n";
}
1;
Here don't forget to add the package declare at the begin line:
package Module; # notice this line
use strict;
require Exporter;
...
Otherwise your module doesn't have its own namespace at all.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/