diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-06-21 11:46:00 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-21 11:46:00 +0200 |
commit | 88fb56ecc95f23db1630e96a259c1febfbe98e20 (patch) | |
tree | 634968a0b338335ed60788448bf260fd4a917298 /pod | |
parent | 8af7af075ba5ee1cc1b075ac71fc302610499e4c (diff) | |
download | perl-88fb56ecc95f23db1630e96a259c1febfbe98e20.tar.gz |
No need for D and d flags in pod.lst - source is fixed, and contains the target
As the edited perldelta is now always pod/perldelta.pod (instead of a file with
version numbers in it), we don't need a 'D' flag to mark it. As perldelta.pod
contains within itself the number of the version it refers to, we can use that
to infer the 'd' flag for the target filename.
This simplifies the release manager's tasklist for version bumping.
Diffstat (limited to 'pod')
-rw-r--r-- | pod/buildtoc | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/pod/buildtoc b/pod/buildtoc index 15127119f1..9e1245d95f 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -117,13 +117,28 @@ if ($Verbose) { print "I will be building $_\n" foreach keys %Build; } +my $delta_target; + +{ + my $source = 'perldelta.pod'; + open my $fh, '<', "pod/$source" or my_die "Can't open pod/$source: $!"; + local $/; + my $contents = <$fh>; + my @want = + $contents =~ /perldelta - what is new for perl v5\.(\d+)\.(\d+)\n/; + die "Can't extract version from pod/$source" unless @want; + $delta_target = "perl5$want[0]$want[1]delta.pod"; + + # This way round so that keys can act as a MANIFEST skip list + # Targets will always be in the pod directory. Currently we can only cope + # with sources being in the same directory. + $Copies{$delta_target} = $source; +} # process pod.lst open my $master, '<', $masterpodfile or my_die "Can't open $masterpodfile: $!"; -my ($delta_source, $delta_target); - foreach (<$master>) { next if /^\#/; @@ -146,15 +161,8 @@ foreach (<$master>) { $flags{indent} = $1 if $flags =~ s/(\d+)//; $flags{toc_omit} = 1 if $flags =~ tr/o//d; $flags{aux} = 1 if $flags =~ tr/a//d; + $flags{perlpod_omit} = "$filename.pod" eq $delta_target; - if ($flags =~ tr/D//d) { - $flags{manifest_omit} = 1; - $delta_source = "$filename.pod"; - } - if ($flags =~ tr/d//d) { - $flags{perlpod_omit} = 1; - $delta_target = "$filename.pod"; - } $Generated{"$filename.pod"}++ if $flags =~ tr/g//d; if ($flags =~ tr/r//d) { @@ -175,18 +183,6 @@ foreach (<$master>) { my_die "Malformed line: $_" if $1 =~ tr/A-Z//; } } -if (defined $delta_source) { - if (defined $delta_target) { - # This way round so that keys can act as a MANIFEST skip list - # Targets will aways be in the pod directory. Currently we can only cope - # with sources being in the same directory. - $Copies{$delta_target} = $delta_source; - } else { - my_die "delta source defined but not target"; - } -} elsif (defined $delta_target) { - my_die "delta target defined but not source"; -} close $master; |