You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by st...@apache.org on 2005/01/13 05:21:50 UTC
svn commit: r125033 - /httpd/apreq/trunk/glue/perl/Makefile.PL
Author: stas
Date: Wed Jan 12 20:21:49 2005
New Revision: 125033
URL: http://svn.apache.org/viewcvs?view=rev&rev=125033
Log:
- if pod2test is not found, skip those tests, don't just die
- try harder to find pod2test, first using Apache::TestConfig::which and
then under perl's local bin dir (which is where pod2test will be found for
local perl installs)
- finally use the perl running Makefile.PL to run pod2test (and not the
one hardcoded in pod2test, which might be wrong)
Modified:
httpd/apreq/trunk/glue/perl/Makefile.PL
Modified: httpd/apreq/trunk/glue/perl/Makefile.PL
Url: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/Makefile.PL?view=diff&rev=125033&p1=httpd/apreq/trunk/glue/perl/Makefile.PL&r1=125032&p2=httpd/apreq/trunk/glue/perl/Makefile.PL&r2=125033
==============================================================================
--- httpd/apreq/trunk/glue/perl/Makefile.PL (original)
+++ httpd/apreq/trunk/glue/perl/Makefile.PL Wed Jan 12 20:21:49 2005
@@ -148,6 +148,8 @@
my @scripts = ();
+use File::Spec::Functions qw(catfile);
+
File::Find::finddepth(sub {
return unless /(.*?\.pl)\.PL$/;
push @scripts, "$File::Find::dir/$1";
@@ -194,9 +196,20 @@
sub test_docs {
my ($pods, $tests) = @_;
-return join "", map <<EOT, 0..$#$pods;
+
+ my $pod2test = Apache::TestConfig::which('pod2test');
+ unless ($pod2test) {
+ # try under the perl's bin
+ require Config;
+ my $bin = $Config::Config{bin};
+ $pod2test = catfile $bin, "pod2test";
+ }
+
+ return "" unless $pod2test and -e $pod2test;
+
+ return join "", map <<EOT, 0..$#$pods;
$$tests[$_]: $$pods[$_]
- pod2test $$pods[$_] $$tests[$_]
+ \$(FULLPERLRUN) $pod2test $$pods[$_] $$tests[$_]
EOT
}