Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Importing variables (not functions) from in-file packages

by AnomalousMonk (Archbishop)
on Feb 12, 2014 at 20:29 UTC ( [id://1074684]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Importing variables (not functions) from in-file packages
in thread Importing variables (not functions) from in-file packages

Isn't $globalVar (when not defined as a lexical variable) just a shortcut for the (main) package variable $::globalVar aka $main::globalVar?

It is a 'shortcut' only if you make the lexical declaration
    our $globalVar;
Then if the first access of the package variable  $globalVar is after the declaration, everybody's happy; otherwise, the variable name must be fully qualified. See our.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-19 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found