Skip to content

Commit ca315d8

Browse files
committed
need to sort when we have multiple unknown keys for consistent output
1 parent a4f858d commit ca315d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Geo/Address/Formatter.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,10 @@ sub format_address {
444444
say STDERR "unknown_components:";
445445
say STDERR Dumper $ra_unknown;
446446
}
447+
# need to sort for consistency
448+
# FIXME - add better sorting based on meaning of the values
447449
$rh_components->{attention} =
448-
join(', ', map { $rh_components->{$_} } @$ra_unknown);
450+
join(', ', map { $rh_components->{$_} } sort @$ra_unknown);
449451
if ($debug){
450452
say STDERR "putting unknown_components in 'attention'";
451453
}

0 commit comments

Comments
 (0)