Previously, the code just removed blead from the list of perls it dealt
with. But this doesn't work, because the algorithm (heuristic,
actually) relies on going through all the versions, and the symbols
erroneously ascribed to blead will instead erroneously be ascribed to
the next lower version. Instead, this commit changes so that blead is
simply not written. (The comments detail why the symbols are
erroneously ascribed to the highest version checked.)
(cherry picked from commit
89c7fcf8b81b3390a318abd2d2f5875305fc5fd1)
Signed-off-by: Nicolas R <atoomic@cpan.org>
my $perls_ref = get_and_sort_perls(\%opt);
-# Get rid of blead
-shift @$perls_ref;
die "Couldn't find any perls" unless @$perls_ref > 1;
for my $v (keys %v) {
+ # Things listed in blead (the most recent file) are special. They are there
+ # by default because we haven't found them anywhere, so they don't really
+ # exist as far as we can determine, so shouldn't be listed as existing.
+ next if $v > $perls_ref->[0]->{file};
+
# @new becomes the symbols for version $v not already in the file for $v
my @new = sort dictionary_order grep { !exists $base_ref->{$_} }
keys %{$v{$v}};