diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-01-24 23:16:04 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-01-24 23:16:04 +0000 |
commit | 4e1a4e482775044c6a704b355706e943127da653 (patch) | |
tree | 72675916a64daff89a70288eb079cb19a05eb7a8 /lib/ExtUtils | |
parent | aa5b165557d6dbcd68fec46d05345cef09320ef1 (diff) | |
download | perl-4e1a4e482775044c6a704b355706e943127da653.tar.gz |
Correct and update comments (before anyone writes in)
Remove a temporary variable.
p4raw-id: //depot/perl@23879
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r-- | lib/ExtUtils/Constant/Base.pm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/ExtUtils/Constant/Base.pm b/lib/ExtUtils/Constant/Base.pm index b25c6040be..1221b7d05d 100644 --- a/lib/ExtUtils/Constant/Base.pm +++ b/lib/ExtUtils/Constant/Base.pm @@ -553,19 +553,18 @@ sub switch_clause { if length ($char) != 1; confess sprintf "char %#X is out of range", ord $char if ord ($char) > 255; $body .= $indent . "case '" . C_stringify ($char) . "':\n"; - # If this looks evil, maybe it is. - # $items is a hashref, and we're doing a hash slice on it - my @items = @{$items}{@{$best->{$char}}}; - # use Data::Dumper; warn Dumper \@items; foreach my $thisone (sort { # Deal with the case of an item actually being an array ref to 1 or 2 - # hashrefs + # hashrefs. Don't assign to $a or $b, as they're aliases to the orignal my $l = ref $a eq 'ARRAY' ? ($a->[0] || $->[1]) : $a; my $r = ref $b eq 'ARRAY' ? ($b->[0] || $->[1]) : $b; - # Sort by name first + # Sort by weight first ($r->{weight} || 0) <=> ($l->{weight} || 0) # Sort equal weights by name - or $l->{name} cmp $r->{name}} @items) { + or $l->{name} cmp $r->{name}} + # If this looks evil, maybe it is. $items is a + # hashref, and we're doing a hash slice on it + @{$items}{@{$best->{$char}}}) { # warn "You are here"; if ($do_front_chop) { $body .= $self->match_clause ({indent => 2 + length $indent, |