summaryrefslogtreecommitdiff
path: root/pod/buildtoc
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-12-15 14:27:01 +0100
committerNicholas Clark <nick@ccl4.org>2011-12-19 13:55:18 +0100
commitb1a2f073f0230f01166eb98b343be7a3f8c41f0a (patch)
tree5e84a36ffc3a521dda543cee70b88cd065267dea /pod/buildtoc
parent7a77d2e5baeb94530947a0b31a8ce3859a05bf10 (diff)
downloadperl-b1a2f073f0230f01166eb98b343be7a3f8c41f0a.tar.gz
If buildtoc spots duplicated pods, that's an error condition, not a skip.
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.
Diffstat (limited to 'pod/buildtoc')
-rw-r--r--pod/buildtoc11
1 files changed, 10 insertions, 1 deletions
diff --git a/pod/buildtoc b/pod/buildtoc
index a5d3d292fc..fa7d134506 100644
--- a/pod/buildtoc
+++ b/pod/buildtoc
@@ -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: