Sort keys in to_string
This commit is contained in:
parent
5f81e9111f
commit
1e98ecb595
|
@ -456,7 +456,7 @@ sub transform {
|
|||
sub to_string {
|
||||
my $type = ref($_[0]);
|
||||
my $fields = eval '\%'.$type.'::fields';
|
||||
return $type . ': '. join(' ' , map { $_[0]{$_} ? "$_ => $_[0]{$_}" : () } keys %$fields );
|
||||
return $type . ': '. join(' ' , map { $_[0]{$_} ? "$_ => $_[0]{$_}" : () } sort { $a cmp $b } keys %$fields );
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue