Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Passing variables between packages

by JediWizard (Deacon)
on Aug 22, 2005 at 16:18 UTC ( [id://485722]=note: print w/replies, xml ) Need Help??


in reply to Passing variables between packages

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://485722]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-24 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found