Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: Global destruction feature / bug ?

by Fletch (Chancellor)
on Apr 03, 2008 at 14:15 UTC ( #678169=note: print w/replies, xml ) Need Help??

in reply to Re: Global destruction feature / bug ?
in thread Global destruction feature / bug ?

Just to play devil's advocate . . .

The name declared by the our isn't globally visible, but the value residing in the symbol table which it refers to is a global. The only difference is the duration of the scoping of the name you're using to access it, so it's entirely reasonable that that value is destroyed along with the normal global variable cleanup pass regardless of how you're accessing it.

(To put it another way, you would definitely be surprised if the value in the global $main::foo was destroyed just because the temporary reference to it you created with local *somepackage::foo = \$main::foo; goes out of scope.)

The cake is a lie.
The cake is a lie.
The cake is a lie.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2016-10-24 20:18 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (309 votes). Check out past polls.