dougm       01/04/12 19:04:52

  Modified:    Apache-Test/lib/Apache TestConfigPerl.pm
  Log:
  allow PerlTransHandler to be properly configured
  
  Revision  Changes    Path
  1.7       +13 -2     modperl-2.0/Apache-Test/lib/Apache/TestConfigPerl.pm
  
  Index: TestConfigPerl.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Apache-Test/lib/Apache/TestConfigPerl.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestConfigPerl.pm 2001/04/13 01:38:38     1.6
  +++ TestConfigPerl.pm 2001/04/13 02:04:52     1.7
  @@ -164,6 +164,7 @@
   
   my %outside_container = map { $_, 1 } qw{
   Alias AliasMatch AddType
  +PerlChildInitHandler PerlTransHandler PerlPostReadRequestHandler
   };
   
   #test .pm's can have configuration after the __DATA__ token
  @@ -210,7 +211,8 @@
   #@INC is auto-modified so each test .pm can be found
   #modules can add their own configuration using __DATA__
   
  -my %hooks = map { $_, ucfirst $_ } qw(access authen authz type fixup log);
  +my %hooks = map { $_, ucfirst $_ }
  +  qw(trans access authen authz type fixup log);
   $hooks{Protocol} = 'ProcessConnection';
   $hooks{Filter}   = 'OutputFilter';
   
  @@ -250,8 +252,17 @@
               }
   
               my $container = $container_config{$hook} || \&location_container;
  +            my @handler_cfg = ($handler => $module);
  +
  +            if ($outside_container{$handler}) {
  +                $self->postamble(@handler_cfg);
  +            }
  +            else {
  +                push @args, @handler_cfg;
  +            }
  +
               $self->postamble($self->$container($module),
  -                             { $handler => $module, @args });
  +                             { @args }) if @args;
   
               $self->write_pm_test($module, lc $base, lc $sub);
           }, $dir);
  
  
  

Reply via email to