summaryrefslogtreecommitdiff
path: root/pod/buildtoc
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-05-18 16:43:50 +0100
committerDavid Mitchell <davem@iabyn.com>2011-05-18 16:43:50 +0100
commitd0f3b1adda7d8e9b56ccba6356ea739d266c5afd (patch)
tree078646bdb790c161a3a0f400244483acb6b3f7cc /pod/buildtoc
parent8891dd8d4c5444371851ec339d7cc20f956ffb5f (diff)
downloadperl-d0f3b1adda7d8e9b56ccba6356ea739d266c5afd.tar.gz
buildtoc - fix a bug and add some comments
while(readdir) doesn't auto-assign to $_ Also, make the informative output clear that its telling you like of files it will be processing, rather than that its actually processing it now.
Diffstat (limited to 'pod/buildtoc')
-rw-r--r--pod/buildtoc9
1 files changed, 7 insertions, 2 deletions
diff --git a/pod/buildtoc b/pod/buildtoc
index 3b61619fd2..bfc39da82f 100644
--- a/pod/buildtoc
+++ b/pod/buildtoc
@@ -54,6 +54,8 @@ foreach (values %Targets) {
$_ = abs_from_top($_);
}
+# process command-line switches
+
{
my @files = keys %Targets;
my $filesopts = join(" | ", map { "--build-$_" } "all", sort @files);
@@ -101,9 +103,12 @@ __USAGE__
);
if ($Verbose) {
- print "I'm building $_\n" foreach keys %Build;
+ print "I will be building $_\n" foreach keys %Build;
}
+
+# process pod.lst
+
open my $master, '<', $masterpodfile or die "$0: Can't open $masterpodfile: $!";
my ($delta_source, $delta_target);
@@ -188,7 +193,7 @@ close $master;
}
opendir my $dh, abs_from_top('pod/');
- while (readdir $dh) {
+ while (defined ($_ = readdir $dh)) {
next unless /\.pod\z/;
push @disk_pods, $_;
++$disk_pods{$_};