Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Do I have to export all variables and functions from my PM file?by stevieb (Canon) |
on Mar 06, 2022 at 02:42 UTC ( [id://11141871]=note: print w/replies, xml ) | Need Help?? |
If I don't use a specific variable outside the PM itself, do I need to export it? No. In fact, please don't export variables at all. Use functions that access the variables, and export them instead. To further, the names you're using lead me to believe that this is a good candidate for an Object Oriented module, therefore you won't have to export anything at all, plus you'll get the added benefit of being able to keep state within your objects.
In Section
Seekers of Perl Wisdom
|
|