With PerlRun, after the script has run the name space is supposed
to be flushed of all variables and subroutines. Right? This doesn't seem
to be happening with my setup. I'm getting incorrect output, based on
previous executions of the script. Here's a simple example:

#!/usr/bin/perl -w
use strict;
use CGI;
my $query = new CGI;
my $x = $query->param('x') || '0';
print "Content-type: text/html\n\n";
print $x;

You execute it as script.cgi?x=1 and it outputs 1. You execute it
as script.cgi?x=2 and it outputs 2. Then from that point on, no matter
if you say x=1 or x=2 it alternates back and forth randomly (based on
the child process blah blah blah)

Technically this should not even be possible under PerlRun. Right?

So my only conclusion is that it's not actually running under PerlRun,
but I can't figure out why. Here's the relevant setup from httpd.conf:

        PerlModule ModPerl::PerlRun

        Alias /cgi-bin/ /var/web/sleuth/cgi-bin/

        <Directory /var/web/sleuth/cgi-bin>
          AddHandler perl-script .cgi
          PerlResponseHandler ModPerl::PerlRun
          PerlOptions +ParseHeaders
          Options +ExecCGI
        </Directory>

Is there a way to tell if the script is actually running under PerlRun
or not? It's acting as if it's running it as a registry script ...

This is with Mod Perl 2...

Thanks,

Patrick

Reply via email to