in reply to Re^2: Do I have to export all variables and functions from my PM file?
in thread Do I have to export all variables and functions from my PM file?
But this is not always so, there are always exceptions to the rule.
Some modules use package vars for external config, e.g. Text::Glob or Data::Dumper °
Some even export readonly vars to be used as constants (instead of barewords without sigils)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) of course TIMTOWTDI, these design patterns date back to the Perl4 times, which had neither OOP nor private lexical vars. Data::Dumper for instance has a dual API.
|
|---|