Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 73071 invoked from network); 31 Jan 2006 00:32:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Jan 2006 00:32:44 -0000 Received: (qmail 91773 invoked by uid 500); 31 Jan 2006 00:32:36 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 91756 invoked by uid 500); 31 Jan 2006 00:32:35 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 91745 invoked by uid 99); 31 Jan 2006 00:32:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2006 16:32:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [68.142.229.94] (HELO smtp111.sbc.mail.re2.yahoo.com) (68.142.229.94) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 30 Jan 2006 16:32:35 -0800 Received: (qmail 43259 invoked from network); 31 Jan 2006 00:32:13 -0000 Received: from unknown (HELO jupiterhost.net) (dan.muey@sbcglobal.net@198.66.78.2 with plain) by smtp111.sbc.mail.re2.yahoo.com with SMTP; 31 Jan 2006 00:32:12 -0000 Message-ID: <43DEB00D.9090106@jupiterhost.net> Date: Mon, 30 Jan 2006 18:32:13 -0600 From: "JupiterHost.Net" User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: modperl@perl.apache.org Subject: Re: Problems with PerlRun References: <7.0.0.16.2.20060130171657.019daa28@comcast.net> In-Reply-To: <7.0.0.16.2.20060130171657.019daa28@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Patrick Kennedy wrote: > 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"; Why not $query->header(); since you've already got CGI and a CGI object? Its probably an old CGI module. I'm basing that on several things: a) "new CGI" is old b) -w is "old" sort of (use warnings) c) bad naming conventions is old ($query ? is this sql ? no its cgi so call it $cgi ;p you'll thank yourself later) d) the header thing mentioned above e) the behavior of the script with the random values #!/usr/bin/perl use strict; use warnings; use CGI; my $cgi = CGI->new(); print $cgi->header(); print "CGI VERSION: $CGI::VERSION
\n"; for($cgi->param('x')) { print "x is $_
\n"; } Make sure the version it has it the latest on CPAN and upgrade if needed and try it again :) HTH