In buildtoc, don't use File::Spec when initialising %BuildFiles.
authorNicholas Clark <nick@ccl4.org>
Tue, 8 Nov 2011 10:57:53 +0000 (11:57 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 18 Nov 2011 10:08:56 +0000 (11:08 +0100)
%BuildFiles is initialised from the leafnames of %Build, which is
initialised from %Targets, which always contains pathnames in Unix
format. Hence using File::Spec->splitpath() is actually erroneous, as it
will process pathnames assuming the format for the current platform.

pod/buildtoc

index 687fd90..142708f 100644 (file)
@@ -261,8 +261,8 @@ close $master;
   }
   my %BuildFiles;
   foreach my $path (values %Build) {
-    (undef, undef, my $file) = File::Spec->splitpath($path);
-    ++$BuildFiles{$file}
+    $path =~ m!([^/]+)$!;
+    ++$BuildFiles{$1};
   }
 
   foreach my $i (sort keys %our_pods) {