in reply to Re: Re: what's $p'a=$a mean?
in thread what's $p'a=$a mean?
There are rarely any hard or fast rules, but generally, variables should have as restricted a scope as is feasible. If other packages don't need your variable, don't make it a package variable. If they do need it, write subs that can set and fetch the variable (if something else changes the variable when you didn't expect it, you can then easily insert debugging code to find out what is changing it. That's tougher to do with package variables).
Cheers,
Ovid
New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)
|
|---|