Sort keys in to_string

This commit is contained in:
Isaac Connor 2018-11-09 12:14:39 -05:00
parent 5f81e9111f
commit 1e98ecb595
1 changed files with 1 additions and 1 deletions

View File

@ -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;