in reply to Loading a module into many packages
1. do "test_func.pm"; instead of use test_func;
2. change test_func.pm to a proper package that exports its functions:
package test_func; use base qw(Exporter); our @EXPORT = qw(test_me); sub test_me { my $txt = shift; print "Exec of test_me with: $txt\n"; return $txt; } 1;
|
|---|