Think about Loose Coupling | |
PerlMonks |
Re: How to use variables from other package?by Necos (Friar) |
on Apr 27, 2003 at 10:52 UTC ( [id://253469]=note: print w/replies, xml ) | Need Help?? |
I know this is a bit overkill, but, another solution altogether would be to write a function that just returns the value of your my'd variables. Something like this would work (untested):
And in your other package: Exporter is a great module, but sometimes people don't want you stepping over their namespaces (functional or otherwise... And I know that you should use @EXPORT_OK, but not everyone does that). So, using fully-qualified function calls can be very useful. Hope that helps some, Theodore Charles III Network Administrator Los Angeles Senior High email->secon_kun@hotmail.com perl -e "map{print++$_}split//,Mdbnr;"
In Section
Seekers of Perl Wisdom
|
|