{Spam?} Re: mod_perl: "our" vs. "my" in CGI scripts

Frédéric Buclin lpsolit at gmail.com
Thu Jun 22 12:43:20 UTC 2006


> 	The following code *does* work:
> 
> 	our $var = 0;
> 	sub foo {print $var;}

Much better is to pass $var to foo() as argument: foo($var). I think 
only a few scripts use this kind of pseudo-global variables anyway. We 
should fix them (e.g. process_bug.cgi and maybe token.cgi too).

LpSolit



More information about the developers mailing list