| Next | Program Repair Shop | 59 | 
This is the second kind of "can't happen":
     354  foreach $filesz (sort { $b <=> $a } keys %names_by_size)
        ...
     364      if (!defined ($filesz))  # this should never happen, but handle it anyway
     365      {
     366        print "$num_files_this_size files of UNDEF:\n    ",
     367            join ("\n    ", @{$names_by_size{$filesz}}), "\n";
     368        next;
     369      }
     370  
$filesz is a hash key
Hash keys are always strings and so are always defined
        % perl -le '$h{undef}=1; ($k)=keys %j; print "defined" if defined $k'
        defined
All this code is doing is checking to see if the Perl implementation has changed
It is not any more useful than this:
        if (2 + 2 != 4) {   # this should never happen, but handle it anyway
          ...
        }
I have removed it
| Next | ![]()  | 
    Copyright © 2006 M. J. Dominus |