in reply to Re: working under mod_cgi and mod_perl
in thread working under mod_cgi and mod_perl

On the other hand everywhere using lexical variables (my) can get you into even more subtle traps as they might get persisted through closures.
That's exactly my problem. I don't have 'global variables' flying around. Everything is done through methods. But I'm having a lot of troubles with forms and getting the correct values from $Q->params. Under Apache::PerlRun everything works OK, but not on Apache::Registry.
  • Comment on Re^2: working under mod_cgi and mod_perl

Replies are listed 'Best First'.
Re^3: working under mod_cgi and mod_perl
by agianni (Hermit) on Aug 29, 2007 at 18:47 UTC
    How are you initializing $Q? I'm assuming it's a my $Q = CGI->new(), but is your code set up so that happens on every execution? I've seen this kind of problem when moving to mod_perl. For example, if you have a method that's returning your CGI object for you, make sure you have an initialization method that sets that at the start of each response.
    perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'