[Omaha.pm] another Redux / Re-ducks
Jay Hannah
jhannah at omnihotels.com
Wed Aug 16 13:21:19 PDT 2006
Before
my %cc = $GTD_Policy->cc_methods(lang_code=>$lang_code);
my @s_cc = sort{$cc{$a} cmp $cc{$b}} keys %cc;
foreach my $cc_type (sort @s_cc) {
push @arr, { code=>$cc_type, desc=>$cc{$cc_type} };
}
After
my %cc = $GTD_Policy->cc_methods(lang_code=>$lang_code);
foreach my $cc_type (sort keys %cc) {
push @arr, { code=>$cc_type, desc=>$cc{$cc_type} };
}
Looks like the first sort intended to sort the keys based on the values,
but then that second sort was throwing all that hard work away...
?
j
More information about the Omaha-pm
mailing list