| Next | Program Repair Shop | 74 |
Now compare_by_fc() nearly goes away:
sub compare_by_fc {
my @file_list;
my @fc_LoL = group_items( \&compare, @file_list );
return @fc_LoL;
}
Heck, it does go away; this:
push @fc_LoL, compare_by_fc (@$array_ref);
becomes this:
push @fc_LoL, group_items ( \&compare, @$array_ref);
14 lines become zero
And the big block of code at 547--577 becomes
my $cmp = sub { my ($a, $b) = @_;
$first_block_by_name{ $a } cmp $first_block_by_name{ $b }
};
my @return_LoL = group_items($cmp, @file_list);
10 lines become 3.
| Next | ![]() |
Copyright © 2006 M. J. Dominus |