Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Loading a module into many packages

by mreece (Friar)
on Oct 26, 2006 at 16:31 UTC ( #580806=note: print w/replies, xml ) Need Help??


in reply to Loading a module into many packages

you can solve this two ways.

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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580806]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2021-03-01 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?