httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
Date Mon, 20 Jan 2003 07:54:38 GMT
stas        2003/01/19 23:54:38

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
  Log:
  Apache::Test: Support <NoAutoConfig> </NoAutoConfig> blocks in .pm
  files, so we can have a full manual control over generated config
  sections. These sections are fully parsed and variables are
  substituted, including vhosts.
  
  Revision  Changes    Path
  1.64      +20 -16    httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
  
  Index: TestConfigPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- TestConfigPerl.pm	20 Jan 2003 07:48:07 -0000	1.63
  +++ TestConfigPerl.pm	20 Jan 2003 07:54:38 -0000	1.64
  @@ -243,6 +243,8 @@
               # strip special container directives like <Base> and </Base>
               my $strip_container = exists $strip_tags{lc $1} ? 1 : 0;
   
  +            $directives{noautoconfig}++ if lc($1) eq 'noautoconfig';
  +
               my $indent = '';
               $self->process_container($_, $fh, lc($1),
                                        $strip_container, $indent);
  @@ -437,26 +439,28 @@
   
           debug "configuring $module";
   
  -        if (my $cv = $add_hook_config{$hook}) {
  -            $self->$cv($module, \@args);
  -        }
  -
  -        my $container = $container_config{$hook} || \&location_container;
  +        unless ($directives->{noautoconfig}) {
  +            if (my $cv = $add_hook_config{$hook}) {
  +                $self->$cv($module, \@args);
  +            }
   
  -        #unless the .pm test already configured the Perl*Handler
  -        unless ($directives->{$handler}) {
  -            my @handler_cfg = ($handler => $module);
  +            my $container = $container_config{$hook} || \&location_container;
   
  -            if ($outside_container{$handler}) {
  -                $self->postamble(@handler_cfg);
  -            } else {
  -                push @args, @handler_cfg;
  +            #unless the .pm test already configured the Perl*Handler
  +            unless ($directives->{$handler}) {
  +                my @handler_cfg = ($handler => $module);
  +
  +                if ($outside_container{$handler}) {
  +                    $self->postamble(@handler_cfg);
  +                } else {
  +                    push @args, @handler_cfg;
  +                }
               }
  -        }
   
  -        my $args_hash = list_to_hash_of_lists(\@args);
  -        $self->postamble($self->$container($module),
  -                         $args_hash) if @args;
  +            my $args_hash = list_to_hash_of_lists(\@args);
  +            $self->postamble($self->$container($module),
  +                $args_hash) if @args;
  +        }
   
           $self->write_pm_test($module, lc $base, lc $sub);
       }
  
  
  

Mime
View raw message