On 7/5/07, CraigT <[EMAIL PROTECTED]> 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

Reply via email to