Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: using eval or equivalent to automatically generate my statementsby Athanasius (Archbishop) |
on Dec 14, 2012 at 15:05 UTC ( [id://1008852]=note: print w/replies, xml ) | Need Help?? |
Yes, I can see that re-design is not an option for you at the moment, and I agree that modularising and adding use strict will aid both debugging and enhancement. But why make it all so complicated? You can have lexical variables which are strict-compliant and still package-global — just use our instead of my:
Output:
You can of course get fancier with @EXPORT, @EXPORT_OK, etc., but using the fully-qualified package names is probably a better strategy as it makes the trail of the global variables self-documenting. Hope that helps,
In Section
Seekers of Perl Wisdom
|
|