Hi Ed,

on which platform do you run Perl 5.005? This makes a
huge difference and I am currently trying to fix an
issue with MacOS(X) (aka "darwin").
Anyway: PodParser requires a recent File::Spec, so that
should work also with perl-5.005* if this prerequisite
is fulfilled. Have you tried that?

Cheers,

Marek

> -----Original Message-----
> From: Ed Avis [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 16, 2002 11:51 PM
> To: [EMAIL PROTECTED]
> Subject: PodParser patch for prehistoric perl
> 
> 
> 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]>
> 

Reply via email to