mod_perl: "our" vs. "my" in CGI scripts

Max Kanat-Alexander mkanat at bugzilla.org
Sat Jun 24 00:01:43 UTC 2006


On Thu, 2006-06-22 at 18:30 +0300, Dennis Melentyev wrote:
> > 	The only global we should normally have is $vars. Subroutines do have a
> > real reason to modify that.
>
> What about passing it to subroutine by reference? 

	I think it's easier to make that one variable ($vars) be global. Most
of our scripts already assume it is anyway.

> Or, use helpers like
> Bugzilla::cgi(), Bugzilla::template() or Bugzilla::vars() to get the
> instances (anyway by ref)?

	That's what I do in my patch, except in files where it would have been
a huge effort.

	-Max
-- 
http://www.everythingsolved.com/
Everything Solved: Competent, Friendly Bugzilla and Linux Services




More information about the developers mailing list