Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
"be consistent"
 
PerlMonks  

Re^12: VarStructor 1.0

by Wassercrats (Initiate)
on Sep 02, 2004 at 14:03 UTC ( [id://388027]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^11: VarStructor 1.0
in thread VarStructor 1.0

You said "...you said it's easy to devise a new variable name and scan the script to make sure it's really not being used yet. Isn't it even easier not to have to do that?"

It depends on the situation. It's faster to do a search than to type "my" 50 times. Sometimes you could recognize that a variable has or hasn't been used before, and variables as long as your example of "$lineIuseHereAndOnlyHere" aren't necessary to make sure you know where belong and avoid accidental reuse, even in a 3000 line program. I know, because I wrote such a program.

I'm not trying to talk anyone into using more globals. I just posted VarSructor, and if you have no use for it at the moment because you don't have to maintain a script that might have globals that you want to locate in the easiest way possible (seems like my detractors would be interested in that so they could refactor it), and if you don't have to reset variables in someone else's script so you could safely loop it without a major rewrite, then don't use the script.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://388027]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.