Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: Global destruction feature / bug ?

by Corion (Pope)
on Apr 03, 2008 at 14:24 UTC ( #678173=note: print w/ replies, xml ) Need Help??

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

It's mostly because of that why I dislike use of our - it establishes a global variable except that I cannot get at it or change it from the outside. And in most cases I've encountered, there always comes a moment where I want/need to change a global variable. For example to add or change some configuration, or change the quote indicator from " to ' or `. And our prevents me from doing that while adding no benefit...

Comment on Re^3: Global destruction feature / bug ?
Select or Download Code
Replies are listed 'Best First'.
Re^4: Global destruction feature / bug ?
by jettero (Monsignor) on Apr 03, 2008 at 14:33 UTC

    You sure about that? That's really not the way I'm seeing it work. It's just like use vars, but shorter and only initially available where you intend to use it. Perhaps I don't see the problem clearly.

    test->function; print "$test::yeah\n"; package test; sub function { our $yeah = 7; }

    I don't see how it limits you, but I do see a clear benefit: I like it better than use vars.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2015-11-26 17:06 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (704 votes), past polls