David E. Wheeler [Fri, 10 Jul 2009 17:14:39 +0000 (10:14 -0700)]
This patch fixes an issue with ExtUtils::Installed when Perl is compiled with
userelocatableinc. It looks a though the issue is that `%Config` contains
local paths when built with -Duserelocatableinc, some, at least, with a
leading "./". The solution is to use `File::Spec->canonpath()` to clean up the
path before comparing two paths that are otherwise the same. A better solution
might be to use some sort of other utility function that checks that paths are
the same even if they're not spelled the same. I didn't notice such a function
in File::Spec, alas.
Also, I'm not sure what effects this change might have on VMS; it deserves
further testing there.
require VMS::Filespec if $Is_VMS;
use vars qw($VERSION);
-$VERSION = '1.43';
+$VERSION = '1.43_1';
$VERSION = eval $VERSION;
sub _is_prefix {
$path = VMS::Filespec::unixify($path);
}
- # Sloppy Unix path normalization.
- $prefix =~ s{/+}{/}g;
- $path =~ s{/+}{/}g;
+ # Unix path normalization.
+ $prefix = File::Spec->canonpath($prefix);
return 1 if substr($path, 0, length($prefix)) eq $prefix;
foreach my $path (qw( man1dir man3dir )) {
SKIP: {
- my $dir = $Config{$path.'exp'};
+ my $dir = File::Spec->canonpath($Config{$path.'exp'});
skip("no man directory $path on this system", 2 ) unless $dir;
my $file = $dir . '/foo';