noslenj123 has asked for the wisdom of the Perl Monks concerning the following question:
My problem is that if I use param('login_name') in &somefunc it has a retained value from elsewhere, like the one entered in during login from the Security module. I tried '-override=>1' on that param and received an error that indicated I could not change the value of that param.sub main { my $q = CGI->new; my $func = $q->param('func'); if ($func eq 'somefunc') { &somefunc } } sub somefunc { my $q = CGI->new; }
So are $q vars being somehow loaded up once in mod_perl and never cleared with each CGI->new?
I could certainly use some tips on understanding variable usage and sharing/not sharing under mod_perl. I am searching through 'practical mod_perl' as well.
I'd appreciate any pointers or direction on how to properly use modules like CGI.pm or how modules behave after they are loaded and compiled in mod_perl.
Your Humble Servant
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mod_perl and CGI variable lifetime puzzle
by perrin (Chancellor) on May 13, 2005 at 19:59 UTC | |
by noslenj123 (Scribe) on May 13, 2005 at 22:26 UTC | |
by perrin (Chancellor) on May 14, 2005 at 16:30 UTC | |
|
Re: mod_perl and CGI variable lifetime puzzle
by Adrade (Pilgrim) on May 14, 2005 at 02:13 UTC |