You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2002/08/15 18:17:53 UTC

cvs commit: modperl-2.0/ModPerl-Registry/t/conf extra.conf.in

stas        2002/08/15 09:17:53

  Modified:    ModPerl-Registry/lib/ModPerl PerlRun.pm Registry.pm
                        RegistryBB.pm RegistryCooker.pm
               ModPerl-Registry/t basic.t
               ModPerl-Registry/t/conf extra.conf.in
  Log:
  method handlers are now working
  
  Revision  Changes    Path
  1.4       +1 -2      modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm
  
  Index: PerlRun.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PerlRun.pm	15 Aug 2002 12:29:06 -0000	1.3
  +++ PerlRun.pm	15 Aug 2002 16:17:52 -0000	1.4
  @@ -10,8 +10,7 @@
   
   use base qw(ModPerl::RegistryCooker);
   
  -# META: prototyping ($$) segfaults on request
  -sub handler {
  +sub handler : method {
       my $class = (@_ >= 2) ? shift : __PACKAGE__;
       my $r = shift;
       return $class->new($r)->default_handler();
  
  
  
  1.5       +1 -1      modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm
  
  Index: Registry.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Registry.pm	15 Aug 2002 12:29:06 -0000	1.4
  +++ Registry.pm	15 Aug 2002 16:17:52 -0000	1.5
  @@ -10,7 +10,7 @@
   
   use base qw(ModPerl::RegistryCooker);
   
  -sub handler {
  +sub handler : method {
       my $class = (@_ >= 2) ? shift : __PACKAGE__;
       my $r = shift;
       return $class->new($r)->default_handler();
  
  
  
  1.4       +1 -2      modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryBB.pm
  
  Index: RegistryBB.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryBB.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RegistryBB.pm	14 Aug 2002 14:27:03 -0000	1.3
  +++ RegistryBB.pm	15 Aug 2002 16:17:52 -0000	1.4
  @@ -10,8 +10,7 @@
   
   use base qw(ModPerl::RegistryCooker);
   
  -# META: prototyping ($$) segfaults on request
  -sub handler {
  +sub handler : method {
       my $class = (@_ >= 2) ? shift : __PACKAGE__;
       my $r = shift;
       return $class->new($r)->default_handler();
  
  
  
  1.17      +2 -2      modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
  
  Index: RegistryCooker.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- RegistryCooker.pm	15 Aug 2002 14:26:10 -0000	1.16
  +++ RegistryCooker.pm	15 Aug 2002 16:17:52 -0000	1.17
  @@ -119,10 +119,10 @@
   #       __PACKAGE__, which is tied to the file)
   #########################################################################
   
  -sub handler {
  +sub handler : method {
       my $class = (@_ >= 2) ? shift : __PACKAGE__;
       my $r = shift;
  -    $class->new($r)->default_handler();
  +    return $class->new($r)->default_handler();
   }
   
   #########################################################################
  
  
  
  1.7       +10 -1     modperl-2.0/ModPerl-Registry/t/basic.t
  
  Index: basic.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/basic.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- basic.t	14 Aug 2002 14:27:45 -0000	1.6
  +++ basic.t	15 Aug 2002 16:17:52 -0000	1.7
  @@ -14,7 +14,7 @@
   
   my @aliases = sort keys %modules;
   
  -plan tests => @aliases * 3;
  +plan tests => @aliases * 3 + 1;
   
   # very basic compilation/response test
   for my $alias (@aliases) {
  @@ -62,3 +62,12 @@
   #    );
   #}
   
  +# test method handlers
  +{
  +    my $url = "/registry_oo_conf/env.pl?foo=bar";
  +    ok t_cmp(
  +        "foo=bar",
  +        GET_BODY($url),
  +        "ModPerl::Registry->handler mod_cgi-like environment pre-set",
  +    );
  +}
  
  
  
  1.7       +0 -1      modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in
  
  Index: extra.conf.in
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- extra.conf.in	2 Jun 2002 12:58:35 -0000	1.6
  +++ extra.conf.in	15 Aug 2002 16:17:52 -0000	1.7
  @@ -53,7 +53,6 @@
       PerlOptions +ParseHeaders
   </Location>
   
  -# META: dumps core on OO handlers
   <Location /registry_oo_conf>
       PerlOptions +GlobalRequest
       SetHandler perl-script