-----Original Message-----
>From: Chris Pax <[EMAIL PROTECTED]>
>Sent: Aug 11, 2007 7:18 PM
>To: beginners@perl.org
>Subject: import perl module after edit
>
>i have two files
>
>###########callbacks.pm###############
>sub foo{
>     return "foo";
>}
>
>sub bar{
>     return "foo";
>}
>1;
>#################
>

My guess,here because you don't declare a package,so when you say "use 
callback" in other package,you just require it.All methods in that required 
file can be accessed directly.
But when you declare a package callback and you use it in other package with 
the same way,due to the symbol space closue,you can't access them 
directly,unless they have been exported already.
See perldoc -f use;
perldoc -f require;
perldoc Exporter;

good luck.

--
Jeff Pang <[EMAIL PROTECTED]>
http://home.arcor.de/jeffpang/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to