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

2003-02-06 Thread stas
stas2003/02/06 15:57:08

  Modified:ModPerl-Registry/t/conf extra.conf.in
  Log:
  add ScriptAlias so we can do tests against mod_cgi
  
  Revision  ChangesPath
  1.9   +2 -0  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- extra.conf.in 24 Dec 2002 01:51:40 -  1.8
  +++ extra.conf.in 6 Feb 2003 23:57:08 -   1.9
  @@ -35,6 +35,8 @@
   Alias /registry_oo_conf/ @ServerRoot@/cgi-bin/
   Alias /perlrun/  @ServerRoot@/cgi-bin/
   
  +ScriptAlias /cgi-bin/ @ServerRoot@/cgi-bin/
  +
   PerlModule ModPerl::RegistryBB
   
   PerlOptions +GlobalRequest
  
  
  



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

2002-12-23 Thread stas
stas2002/12/23 17:51:40

  Modified:ModPerl-Registry/lib/ModPerl RegistryCooker.pm
   ModPerl-Registry/t/conf extra.conf.in
  Added:   ModPerl-Registry/t 404.t
   ModPerl-Registry/t/cgi-bin 404.pl
  Log:
  fix the handling of the return status in ModPerl::RegistryCooker,
  add a test to verify that
  
  Revision  ChangesPath
  1.1  modperl-2.0/ModPerl-Registry/t/404.t
  
  Index: 404.t
  ===
  use strict;
  use warnings FATAL => 'all';
  
  use Apache::Test;
  use Apache::TestUtil;
  use Apache::TestRequest qw(GET_BODY HEAD);
  
  plan tests => 1;
  
  my $url = "/error_document/cannot_be_found";
  
  {
  my $response = "Oops, can't find the requested doc";
  ok t_cmp(
  $response,
  GET_BODY($url),
  "test ErrorDocument",
 );
  }
  
  
  
  1.1  modperl-2.0/ModPerl-Registry/t/cgi-bin/404.pl
  
  Index: 404.pl
  ===
  use strict;
  use warnings;
  
  my $r = shift;
  $r->content_type('text/plain');
  print "Oops, can't find the requested doc";
  
  
  
  1.24  +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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- RegistryCooker.pm 16 Aug 2002 09:01:17 -  1.23
  +++ RegistryCooker.pm 24 Dec 2002 01:51:40 -  1.24
  @@ -157,9 +157,9 @@
   # handlers shouldn't set $r->status but return it
   my $old_status = $self->[REQ]->status;
   my $rc = $self->run;
  -my $new_status = $self->[REQ]->status($old_status);
  +$self->[REQ]->status($old_status);
   
  -return ($rc != Apache::OK) ? $rc : $new_status;
  +return ($rc != Apache::OK) ? $rc : $self->[STATUS];
   }
   
   #
  
  
  
  1.8   +9 -0  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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- extra.conf.in 15 Aug 2002 16:17:52 -  1.7
  +++ extra.conf.in 24 Dec 2002 01:51:40 -  1.8
  @@ -117,3 +117,12 @@
   PerlOptions +ParseHeaders
   
   
  +### the 404 test ###
  +
  +Alias /error_document/ @ServerRoot@/cgi-bin/
  +
  +ErrorDocument 404 /error_document/404.pl
  +SetHandler perl-script
  +Options +ExecCGI
  +PerlResponseHandler ModPerl::Registry
  +
  
  
  



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

2002-08-15 Thread stas

stas2002/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  ChangesPath
  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.pm15 Aug 2002 12:29:06 -  1.3
  +++ PerlRun.pm15 Aug 2002 16:17:52 -  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 -  1.4
  +++ Registry.pm   15 Aug 2002 16:17:52 -  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 -  1.3
  +++ RegistryBB.pm 15 Aug 2002 16:17:52 -  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 -  1.16
  +++ RegistryCooker.pm 15 Aug 2002 16:17:52 -  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 -  1.6
  +++ basic.t   15 Aug 2002 16:17:52 -  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 -   1.6
  +++ extra.conf.in 15 Aug 2002 16:17:52 -  1.7
  @@ -53,7 +53,6 @@
   PerlOptions +ParseHeaders
   
   
  -# META: dumps core on OO handlers
   
   PerlOptions +GlobalRequest
   SetHandler perl-script
  
  
  



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

2002-06-02 Thread stas

stas2002/06/02 05:58:35

  Modified:ModPerl-Registry/t/conf extra.conf.in
  Log:
  s/Mblib=/I/ so it'll work on darwin/5.6.0
  
  Revision  ChangesPath
  1.6   +7 -7  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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- extra.conf.in 22 May 2002 05:40:48 -  1.5
  +++ extra.conf.in 2 Jun 2002 12:58:35 -   1.6
  @@ -5,13 +5,13 @@
   
   PerlModule Apache2
   
  -PerlSwitches -Mlib=@ServerRoot@/../lib  \
  - -Mlib=@ServerRoot@/../../Apache-Test/lib   \
  - -Mlib=@ServerRoot@/../../lib   \
  - -Mlib=@ServerRoot@/../../blib/lib/Apache2  \
  - -Mlib=@ServerRoot@/../../blib/arch/Apache2 \
  - -Mlib=@ServerRoot@/../../blib/lib  \
  - -Mlib=@ServerRoot@/../../blib/arch
  +PerlSwitches -I@ServerRoot@/../lib  \
  + -I@ServerRoot@/../../Apache-Test/lib   \
  + -I@ServerRoot@/../../lib   \
  + -I@ServerRoot@/../../blib/lib/Apache2  \
  + -I@ServerRoot@/../../blib/arch/Apache2 \
  + -I@ServerRoot@/../../blib/lib  \
  + -I@ServerRoot@/../../blib/arch
   
   # run on startup
   PerlRequire @ServerRoot@/conf/modperl_extra_startup.pl
  
  
  



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

2002-05-21 Thread stas

stas02/05/21 22:40:48

  Modified:ModPerl-Registry MANIFEST
   ModPerl-Registry/t basic.t closure.t special_blocks.t
   ModPerl-Registry/t/conf extra.conf.in
  Removed: ModPerl-Registry/lib/ModPerl RegistryNG.pm
  Log:
  Apache::RegistryNG is now ModPerl::Registry, no need for NG version
  anymore
  
  Revision  ChangesPath
  1.3   +0 -1  modperl-2.0/ModPerl-Registry/MANIFEST
  
  Index: MANIFEST
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/MANIFEST,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MANIFEST  11 Oct 2001 19:50:20 -  1.2
  +++ MANIFEST  22 May 2002 05:40:48 -  1.3
  @@ -6,7 +6,6 @@
   lib/ModPerl/Registry.pm
   lib/ModPerl/RegistryBB.pm
   lib/ModPerl/RegistryCooker.pm
  -lib/ModPerl/RegistryNG.pm
   t/TEST.PL
   t/basic.t
   t/closure.t
  
  
  
  1.5   +0 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- basic.t   5 Apr 2002 18:44:39 -   1.4
  +++ basic.t   22 May 2002 05:40:48 -  1.5
  @@ -8,7 +8,6 @@
   
   my %modules = 
   (registry=> 'ModPerl::Registry',
  - registry_ng => 'ModPerl::RegistryNG',
registry_bb => 'ModPerl::RegistryBB',
perlrun => 'ModPerl::PerlRun',
   );
  
  
  
  1.5   +1 -1  modperl-2.0/ModPerl-Registry/t/closure.t
  
  Index: closure.t
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/closure.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- closure.t 19 Oct 2001 06:52:57 -  1.4
  +++ closure.t 22 May 2002 05:40:48 -  1.5
  @@ -13,7 +13,7 @@
   # interpreter all the time (in case that the server is running more
   # than one interpreter)
   
  -my @modules = qw(registry registry_ng registry_bb perlrun);
  +my @modules = qw(registry registry_bb perlrun);
   
   plan tests => 6;
   
  
  
  
  1.4   +0 -1  modperl-2.0/ModPerl-Registry/t/special_blocks.t
  
  Index: special_blocks.t
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/special_blocks.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- special_blocks.t  14 May 2002 15:47:12 -  1.3
  +++ special_blocks.t  22 May 2002 05:40:48 -  1.4
  @@ -9,7 +9,6 @@
   
   my %modules = (
   registry=> 'ModPerl::Registry',
  -registry_ng => 'ModPerl::RegistryNG',
   registry_bb => 'ModPerl::RegistryBB',
   perlrun => 'ModPerl::PerlRun',
   );
  
  
  
  1.5   +0 -19 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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- extra.conf.in 14 May 2002 15:55:21 -  1.4
  +++ extra.conf.in 22 May 2002 05:40:48 -  1.5
  @@ -31,20 +31,10 @@
   ### Normal registry setup ###
   #
   Alias /registry/ @ServerRoot@/cgi-bin/
  -Alias /registry_ng/  @ServerRoot@/cgi-bin/
   Alias /registry_bb/  @ServerRoot@/cgi-bin/
   Alias /registry_oo_conf/ @ServerRoot@/cgi-bin/
   Alias /perlrun/  @ServerRoot@/cgi-bin/
   
  -PerlModule ModPerl::RegistryNG
  -
  -PerlOptions +GlobalRequest
  -SetHandler perl-script
  -Options +ExecCGI
  -PerlResponseHandler ModPerl::RegistryNG
  -PerlOptions +ParseHeaders
  -
  -
   PerlModule ModPerl::RegistryBB
   
   PerlOptions +GlobalRequest
  @@ -86,20 +76,11 @@
   ###
   
   Alias /same_interp/registry/ @ServerRoot@/cgi-bin/
  -Alias /same_interp/registry_ng/  @ServerRoot@/cgi-bin/
   Alias /same_interp/registry_bb/  @ServerRoot@/cgi-bin/
   Alias /same_interp/registry_oo_conf/ @ServerRoot@/cgi-bin/
   Alias /same_interp/perlrun/  @ServerRoot@/cgi-bin/
   
   PerlModule Apache::TestHandler
  -
  -PerlOptions +GlobalRequest
  -SetHandler perl-script
  -Options +ExecCGI
  -PerlFixupHandler Apache::TestHandler::same_interp_fixup
  -PerlResponseHandler ModPerl::RegistryNG
  -PerlOptions +ParseHeaders
  -
   
   
   PerlOptions +GlobalRequest
  
  
  



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

2002-05-14 Thread stas

stas02/05/14 08:55:21

  Modified:ModPerl-Registry/t/conf extra.conf.in
  Log:
  - must define the @INC changes in one touch, or the order becoming
reversed, and that's not what we want.
  - use Apache2 (to cover the case where Apache2/ prefix is needed)
  
  Revision  ChangesPath
  1.4   +10 -6 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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- extra.conf.in 13 Nov 2001 04:33:06 -  1.3
  +++ extra.conf.in 14 May 2002 15:55:21 -  1.4
  @@ -3,14 +3,18 @@
   # make sure that we test under Taint mode
   PerlSwitches -T
   
  +PerlModule Apache2
  +
  +PerlSwitches -Mlib=@ServerRoot@/../lib  \
  + -Mlib=@ServerRoot@/../../Apache-Test/lib   \
  + -Mlib=@ServerRoot@/../../lib   \
  + -Mlib=@ServerRoot@/../../blib/lib/Apache2  \
  + -Mlib=@ServerRoot@/../../blib/arch/Apache2 \
  + -Mlib=@ServerRoot@/../../blib/lib  \
  + -Mlib=@ServerRoot@/../../blib/arch
  +
   # run on startup
   PerlRequire @ServerRoot@/conf/modperl_extra_startup.pl
  -
  -PerlSwitches -Mlib=@ServerRoot@/../lib
  -PerlSwitches -Mlib=@ServerRoot@/../../Apache-Test/lib
  -PerlSwitches -Mlib=@ServerRoot@/../../lib
  -PerlSwitches -Mlib=@ServerRoot@/../../blib/lib
  -PerlSwitches -Mlib=@ServerRoot@/../../blib/arch
   
    DEVMODE: Remove in production ###
   PerlModule Apache::Reload