You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2003/04/28 07:27:51 UTC

[mp2] cgi tests

In testing the latest mod_perl 2 with the just released CGI.pm
version 2.92, I get failures in the cgi.t, cgiupload.t, and
include.t tests under t/modules/. I think this is due to the
patch to 'sub r' of CGI.pm contained in Stas' message to the
mod_perl list of Friday, Apr 18 (Re: a new API proposal ...) not
making it into this version of CGI.pm. Applying this patch to
CGI.pm allows all tests to pass.

-- 
best regards,
randy


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] cgi tests

Posted by Stas Bekman <st...@stason.org>.
Lincoln Stein wrote:
> Hi Stas,
> 
> It was @_ in all the betas that I sent out, but apparently was *changed* just 
> before the release when I added an innocuous-looking patch file to fix P3P 
> syntax submitted by another user.  A case of not looking at the patch 
> carefully.
> 
> I fixed it back to @_ as soon as I got the first bug report this morning.  Use 
> 2.93 (2.92 will now be deleted).

Thanks Lincoln, looks good.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] cgi tests

Posted by Lincoln Stein <ls...@cshl.org>.
Hi Stas,

It was @_ in all the betas that I sent out, but apparently was *changed* just 
before the release when I added an innocuous-looking patch file to fix P3P 
syntax submitted by another user.  A case of not looking at the patch 
carefully.

I fixed it back to @_ as soon as I got the first bug report this morning.  Use 
2.93 (2.92 will now be deleted).

Lincoln


On Monday 28 April 2003 02:33 am, Stas Bekman wrote:
> Randy Kobes wrote:
> > On Mon, 28 Apr 2003, Stas Bekman wrote:
> >>Randy Kobes wrote:
> >>>In testing the latest mod_perl 2 with the just released CGI.pm
> >>>version 2.92, I get failures in the cgi.t, cgiupload.t, and
> >>>include.t tests under t/modules/. I think this is due to the
> >>>patch to 'sub r' of CGI.pm contained in Stas' message to the
> >>>mod_perl list of Friday, Apr 18 (Re: a new API proposal ...) not
> >>>making it into this version of CGI.pm. Applying this patch to
> >>>CGI.pm allows all tests to pass.
> >>
> >>Lincoln, can you please check why my patch didn't go in? Now
> >>things are broken.
> >>
> >>Thanks.
> >
> > Just to be explicit, here's the patch I applied against CGI.pm
> > 2.92 to get the mod_perl 2 tests to pass:
> >
> > ================================================================
> > --- CGI.pm~	Sun Apr 27 19:39:10 2003
> > +++ CGI.pm	Mon Apr 28 01:02:30 2003
> > @@ -329,9 +329,9 @@
> >
> >  sub r {
> >    my $self = shift;
> > -  my $r = $self->{'.r'};
> > -  $self->{'.r'} = shift if @ARGV;
> > -  $r;
> > +  $self->{'.r'} = shift if @_;
> > +  $self->{'.r'} ||= Apache->request;
> > +  $self->{'.r'};
> >  }
> >
> >  #### Method: param
> > ===============================================================
>
> The actual bug is in using @ARGV instead of @_. I don't know why in the
> last moment @_ was replaced with @ARGV, that wasn't the case in the beta12
> Lincoln has posted on Apr 19 to the mod_perl list.
>
> --- CGI.pm.orig 2003-04-28 16:26:10.000000000 +1000
> +++ CGI.pm      2003-04-28 16:26:31.000000000 +1000
> @@ -330,7 +330,7 @@
>   sub r {
>     my $self = shift;
>     my $r = $self->{'.r'};
> -  $self->{'.r'} = shift if @ARGV;
> +  $self->{'.r'} = shift if @_;
>     $r;
>   }
>
> Randy, your patch works as well, but Lincoln has preferred to do it
> differently.
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein@cshl.org			                  Cold Spring Harbor, NY
========================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] cgi tests

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Mon, 28 Apr 2003, Stas Bekman wrote:
> 
> 
>>Randy Kobes wrote:
>>
>>>In testing the latest mod_perl 2 with the just released CGI.pm
>>>version 2.92, I get failures in the cgi.t, cgiupload.t, and
>>>include.t tests under t/modules/. I think this is due to the
>>>patch to 'sub r' of CGI.pm contained in Stas' message to the
>>>mod_perl list of Friday, Apr 18 (Re: a new API proposal ...) not
>>>making it into this version of CGI.pm. Applying this patch to
>>>CGI.pm allows all tests to pass.
>>
>>Lincoln, can you please check why my patch didn't go in? Now
>>things are broken.
>>
>>Thanks.
> 
> 
> Just to be explicit, here's the patch I applied against CGI.pm
> 2.92 to get the mod_perl 2 tests to pass:
> 
> ================================================================
> --- CGI.pm~	Sun Apr 27 19:39:10 2003
> +++ CGI.pm	Mon Apr 28 01:02:30 2003
> @@ -329,9 +329,9 @@
>  
>  sub r {
>    my $self = shift;
> -  my $r = $self->{'.r'};
> -  $self->{'.r'} = shift if @ARGV;
> -  $r;
> +  $self->{'.r'} = shift if @_;
> +  $self->{'.r'} ||= Apache->request;
> +  $self->{'.r'};
>  }
>  
>  #### Method: param
> ===============================================================

The actual bug is in using @ARGV instead of @_. I don't know why in the last 
moment @_ was replaced with @ARGV, that wasn't the case in the beta12 Lincoln 
has posted on Apr 19 to the mod_perl list.

--- CGI.pm.orig 2003-04-28 16:26:10.000000000 +1000
+++ CGI.pm      2003-04-28 16:26:31.000000000 +1000
@@ -330,7 +330,7 @@
  sub r {
    my $self = shift;
    my $r = $self->{'.r'};
-  $self->{'.r'} = shift if @ARGV;
+  $self->{'.r'} = shift if @_;
    $r;
  }

Randy, your patch works as well, but Lincoln has preferred to do it differently.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] cgi tests

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 28 Apr 2003, Stas Bekman wrote:

> Randy Kobes wrote:
> > In testing the latest mod_perl 2 with the just released CGI.pm
> > version 2.92, I get failures in the cgi.t, cgiupload.t, and
> > include.t tests under t/modules/. I think this is due to the
> > patch to 'sub r' of CGI.pm contained in Stas' message to the
> > mod_perl list of Friday, Apr 18 (Re: a new API proposal ...) not
> > making it into this version of CGI.pm. Applying this patch to
> > CGI.pm allows all tests to pass.
> 
> Lincoln, can you please check why my patch didn't go in? Now
> things are broken.
> 
> Thanks.

Just to be explicit, here's the patch I applied against CGI.pm
2.92 to get the mod_perl 2 tests to pass:

================================================================
--- CGI.pm~	Sun Apr 27 19:39:10 2003
+++ CGI.pm	Mon Apr 28 01:02:30 2003
@@ -329,9 +329,9 @@
 
 sub r {
   my $self = shift;
-  my $r = $self->{'.r'};
-  $self->{'.r'} = shift if @ARGV;
-  $r;
+  $self->{'.r'} = shift if @_;
+  $self->{'.r'} ||= Apache->request;
+  $self->{'.r'};
 }
 
 #### Method: param
===============================================================

-- 
best regards,
randy


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] cgi tests

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> In testing the latest mod_perl 2 with the just released CGI.pm
> version 2.92, I get failures in the cgi.t, cgiupload.t, and
> include.t tests under t/modules/. I think this is due to the
> patch to 'sub r' of CGI.pm contained in Stas' message to the
> mod_perl list of Friday, Apr 18 (Re: a new API proposal ...) not
> making it into this version of CGI.pm. Applying this patch to
> CGI.pm allows all tests to pass.

Lincoln, can you please check why my patch didn't go in? Now things are broken.

Thanks.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org