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 Changes
Date Tue, 29 Apr 2003 01:37:36 GMT
stas        2003/04/28 18:37:36

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
               perl-framework/Apache-Test Changes
  Log:
  If the /pod subdir can't be found in @INC, try the slower search for
  .pod files in order to set the 'perlpod' variable
  
  Revision  Changes    Path
  1.156     +19 -1     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.155
  retrieving revision 1.156
  diff -u -r1.155 -r1.156
  --- TestConfig.pm	29 Apr 2003 01:33:29 -0000	1.155
  +++ TestConfig.pm	29 Apr 2003 01:37:35 -0000	1.156
  @@ -214,7 +214,7 @@
       $vars->{t_dir}        ||= catfile $vars->{top_dir}, 't';
       $vars->{serverroot}   ||= $vars->{t_dir};
       $vars->{documentroot} ||= catfile $vars->{serverroot}, 'htdocs';
  -    $vars->{perlpod}      ||= $self->find_in_inc('pod');
  +    $vars->{perlpod}      ||= $self->find_perlpod();
       $vars->{perl}         ||= $^X;
       $vars->{t_conf}       ||= catfile $vars->{serverroot}, 'conf';
       $vars->{sslca}        ||= catfile $vars->{t_conf}, 'ssl', 'ca';
  @@ -1179,6 +1179,24 @@
           return $location if -d $location;
       }
       return "";
  +}
  +
  +sub find_perlpod {
  +    my($self) = @_;
  +
  +    my $perlpod = $self->find_in_inc('pod') || $self->find_in_inc('Pod');
  +    return $perlpod if $perlpod;
  +
  +    # if the /pod sub-dir wasn't found, try the slow search for .pod files
  +    my %pod_dir = ();
  +    for my $path (@INC) {
  +        next unless -d $path;
  +        finddepth(sub { $pod_dir{$File::Find::dir}++ if /\.pod$/i; }, $path);
  +        my @most = sort {$pod_dir{$b} <=> $pod_dir{$a} } keys %pod_dir;
  +        return $most[0] if @most;
  +    }
  +
  +    return '';
   }
   
   sub prepare_t_conf {
  
  
  
  1.10      +5 -0      httpd-test/perl-framework/Apache-Test/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Changes	28 Apr 2003 03:14:30 -0000	1.9
  +++ Changes	29 Apr 2003 01:37:36 -0000	1.10
  @@ -8,6 +8,11 @@
   
   =item 1.01-dev
   
  +If the /pod subdir can't be found in @INC, try the slower search for
  +.pod files in order to set the 'perlpod' variable [Stas]
  +
  +Autoconfigure Alias /getfiles-* only if the corresponding targets
  +exist [Stas]
   
   =item 1.00
   
  
  
  

Mime
View raw message