Perl Monk, Perl Meditation | |
PerlMonks |
Re: Do I have to export all variables and functions from my PM file?by syphilis (Archbishop) |
on Mar 05, 2022 at 23:55 UTC ( [id://11141869]=note: print w/replies, xml ) | Need Help?? |
And I've wondered if I must export functions, strings, arrays, etc. etc. that are not used outside of the PM module? I just want to point out that (as you may already know) functions, package variables and package constants can all be accessed from the "outside" even if they're not exported. They just have to be accessed via their fully qualified names - eg My::Mod::foo() instead of simply foo(), $My::Mod::package_var instead of $package_var and My::Mod::CONST_VAL instead of CONST_VAL. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|