> >
> > > I have a hash for the posted cgi variables but
> > > that gets cleared out when it's reset anyways, and I have about 30
> global
> > > variables that I just set explicitly at the start of the code.
> >
> > That sounds fine.  Eventually you should probably look at turning those
> > into lexicals or possibly wrapping them in an object if they are all
> > related.  Globals are generally a maintenance problem, regardless of
> > whether or not they are being used in a mod_perl app.
>

I went back and forth on this for quite a while.  Our application processes
 online order data, and it performs a bunch of actions in sequence on the
 same data, each action modifying some of the data and passing it on to the
 next routine.  Due to the how the current code is written I could either
 pass a bunch of variables to each subroutine, or declare them as globals in
the modules.  Sometime we will rewrite a few things that will make it easier
to lexically scope everything except for the database handle and the cgi
vars, but for now it's working.




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to