Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: the "our" declaration ?!!

by rir (Vicar)
on Jan 20, 2009 at 21:54 UTC ( [id://737696]=note: print w/replies, xml ) Need Help??


in reply to Re^2: the "our" declaration ?!!
in thread the "our" declaration ?!!

The strict pragma only protects the current namespace

No, remove the use strict; and the below will run without complaint.

package X; use strict; sub one { 1 } package Y; $yy = 1; package main; exit; __DATA__ Global symbol "$yy" requires explicit package name at x line 6. Execution of x aborted due to compilation errors.
Be well,
rir

Update: added initial quote for clarity

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-20 01:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found