[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing CGI paramters


On 7/5/07, CraigT <suppressed> wrote:
Is what I'm hearing you say is that in the PerlRun environment (and I'm
guessing the mod_perl environment too), anything that a subroutine uses
coming from outside that code must be passed as a parameter like
'&sub($paramter)'.   Am I correct in this.

Unless you are trying to create a variable that never changes, yes.
This is true in all perl code, not just mod_perl.  You don't notice
the effect in CGI because the interpreter exits.  This is a general
good practice for programming -- you want subroutines to be
independent and have no side effects on variables that are not passed
to them.

- Perrin


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.