Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^9: Global variable vs passing variable from sub to sub

by Wassercrats
on Sep 16, 2004 at 01:57 UTC ( #391341=note: print w/ replies, xml ) Need Help??


in reply to Re^8: Global variable vs passing variable from sub to sub
in thread Global variable vs passing variable from sub to sub

You said "Absolutely no luck is needed if you create functions or modules to access the data from somewhere else."

And that's all you said about it. Similar to dragonchild referring me to a long post in another thread. I stand my my statement that "You need luck when combining all code that requires a given piece of data into a single, scoped block, or region, because if you end up needing that data once you're working on a different part of the script (things like that come up in the real world), things can get messy."

If things don't get messy at that point, it's because you spent extra time programming in a different way than I do, and I don't think it's worth it.


Comment on Re^9: Global variable vs passing variable from sub to sub
Re^10: Global variable vs passing variable from sub to sub
by Steve_p (Priest) on Sep 16, 2004 at 02:40 UTC

    And that's all you said about it.

    And that's all that needs to be said. Luck plays no part in developing software.

      No, I think Wassercrats got it right on that one. If your not doing any planning, then your relying on luck ;)

        From my experiences, agile development methods require no luck. If, however, you write programs with nothing but global variables, then, yes, you need luck.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2014-07-14 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (262 votes), past polls