stas 2003/04/28 20:44:23
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
perl-framework/Apache-Test Changes
Log:
Randal suggested to replicate the perldoc logic, which searches in pods/
or pod/ subdirs, thus simplifying things
Submitted by: Randal L. Schwartz <[email protected]>
Revision Changes Path
1.157 +2 -19
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.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- TestConfig.pm 29 Apr 2003 01:37:35 -0000 1.156
+++ TestConfig.pm 29 Apr 2003 03:44:23 -0000 1.157
@@ -214,7 +214,8 @@
$vars->{t_dir} ||= catfile $vars->{top_dir}, 't';
$vars->{serverroot} ||= $vars->{t_dir};
$vars->{documentroot} ||= catfile $vars->{serverroot}, 'htdocs';
- $vars->{perlpod} ||= $self->find_perlpod();
+ $vars->{perlpod} ||= $self->find_in_inc('pods') ||
+ $self->find_in_inc('pod');
$vars->{perl} ||= $^X;
$vars->{t_conf} ||= catfile $vars->{serverroot}, 'conf';
$vars->{sslca} ||= catfile $vars->{t_conf}, 'ssl', 'ca';
@@ -1179,24 +1180,6 @@
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.11 +2 -2 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Changes 29 Apr 2003 01:37:36 -0000 1.10
+++ Changes 29 Apr 2003 03:44:23 -0000 1.11
@@ -8,8 +8,8 @@
=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]
+perlpods are found either in the 'pods/' or 'pod/' subdirs [Randal
+L. Schwartz <[email protected]>]
Autoconfigure Alias /getfiles-* only if the corresponding targets
exist [Stas]