diff options
author | David Mitchell <davem@iabyn.com> | 2011-05-18 16:43:50 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-05-18 16:43:50 +0100 |
commit | d0f3b1adda7d8e9b56ccba6356ea739d266c5afd (patch) | |
tree | 078646bdb790c161a3a0f400244483acb6b3f7cc /pod/buildtoc | |
parent | 8891dd8d4c5444371851ec339d7cc20f956ffb5f (diff) | |
download | perl-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/buildtoc | 9 |
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{$_}; |