Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Passing variables between packagesby JediWizard (Deacon) |
on Aug 22, 2005 at 16:18 UTC ( [id://485722]=note: print w/replies, xml ) | Need Help?? |
This may already be covered in merlyn's reply... but IMHO: You should never explicitly refer to main::anything from with in a package (other than main). The same goes for all packages. ASAIK The point of making a packge it to hide data/functions/whatever form other packages. If you need to maniplate vailables in another package it should either have an accessor method, or export the variable into your namespace. That is just a "Best Practice"... again My Humble Oppinion. They say that time changes things, but you actually have to change them yourself. Andy Warhol
In Section
Seekers of Perl Wisdom
|
|