Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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 !@monks...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2018-05-22 12:45 GMT
Find Nodes?
    Voting Booth?