Syntactic Confectionery Delight | |
PerlMonks |
Re: Accessing hash from within moduleby BrowserUk (Patriarch) |
on Feb 12, 2012 at 01:12 UTC ( [id://953269]=note: print w/replies, xml ) | Need Help?? |
As an extension of Jenda's post. Instead of making the entire %lglobal hash visible, just cherry pick the bits of it each module needs:
And you can scope the visibility to exactly the packages, subroutines or just blocks where you need it, giving effectively lexically scoped access to your global data. It's one of Perl's most underrated features. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|