If buildtoc spots duplicated pods, that's an error condition, not a skip.
authorNicholas Clark <nick@ccl4.org>
Thu, 15 Dec 2011 13:27:01 +0000 (14:27 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 19 Dec 2011 12:55:18 +0000 (13:55 +0100)
As of commit 9a8cc8a45d2bc98d, pod/buildtoc no longer scans ext/ for files
containing Pod. Hence it will no longer find the same file in both lib/ and
ext/, and hence the de-duplication code is no longer needed for correct
functionality. Duplicate Pods existing should never happen, so instead of
removing the code, it feels more useful to make it a build time error.

Add an editor block.

pod/buildtoc

index a5d3d29..fa7d134 100644 (file)
@@ -62,7 +62,9 @@ for (@modpods) {
     $name =~ s/\.p(m|od)$//;
     $name =~ s-\Alib/--;
     $name =~ s-/-::-g;
-    next if $done{$name}++;
+    my_die("Duplicate files for $name, '$done{$name}' and '$_'")
+        if exists $done{$name};
+    $done{$name} = $_;
 
     $Found{$name =~ /^[a-z]/ ? 'PRAGMA' : 'MODULE'}{$name} = $_;
 }
@@ -310,3 +312,10 @@ sub unitem {
     }
     $initem = 0;
 }
+
+# Local variables:
+# cperl-indent-level: 4
+# indent-tabs-mode: nil
+# End:
+#
+# ex: set ts=8 sts=4 sw=4 et: