The following patch makes PodParser-1.20 build and test cleanly on
perl 5.005. I hope you can apply it, since this version of perl is
still commonly used on many servers. It's only a patch to one set of
test cases.
--- PodParser-1.20/t/pod/find.t Fri Sep 1 16:25:41 2000
+++ PodParser-1.20-new/t/pod/find.t Fri Nov 15 15:48:42 2002
@@ -86,7 +86,9 @@
ok($result,$compare);
}
else {
- $compare = File::Spec->catfile($Config::Config{privlib},"perlfunc.pod");
+ # The location of perlfunc.pod seems different before 5.6.0.
+ my $perlfunc = ($[ >= 5.006 ? 'perlfunc.pod' : 'pod/perlfunc.pod');
+ $compare = File::Spec->catfile($Config::Config{privlib},$perlfunc);
ok(_canon($result),_canon($compare));
}
@@ -95,11 +97,13 @@
{
my ($path) = @_;
$path = File::Spec->canonpath($path);
- my @comp = File::Spec->splitpath($path);
- my @dir = File::Spec->splitdir($comp[1]);
- $comp[1] = File::Spec->catdir(@dir);
- $path = File::Spec->catpath(@dir);
- $path = uc($path) if File::Spec->case_tolerant;
+ if ($[ >= 5.006) {
+ my @comp = File::Spec->splitpath($path);
+ my @dir = File::Spec->splitdir($comp[1]);
+ $comp[1] = File::Spec->catdir(@dir);
+ $path = File::Spec->catpath(@dir);
+ $path = uc($path) if File::Spec->case_tolerant;
+ }
$path;
}
I haven't yet tested that it leaves the code unchanged on 5.6.0 and
above, but since all the changes are conditional on $] < 5.006, it
ought to have no effect on newer perls.
--
Ed Avis <[EMAIL PROTECTED]>