Skip to content

Commit

Permalink
autoconf: store autom4te request keys in sorted order
Browse files Browse the repository at this point in the history
Notced unstable key order when debugging unrelated bug.
Data::Dumper's SortKeys() makes ordering stable and decreases
diffs from run to run. No functional change otherwise.

* lib/Autom4te/C4che.pm
* lib/Autom4te/Request.pm: Sort request keys in serialization.

Copyright-paperwork-exempt: yes
  • Loading branch information
trofi authored and eggert committed Sep 9, 2022
1 parent 31f6734 commit c2ab755
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Autom4te/C4che.pm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ sub marshall ($)
my $res = '';

my $marshall = Data::Dumper->new ([\@request], [qw (*request)]);
$marshall->Indent(2)->Terse(0);
$marshall->Indent(2)->Terse(0)->Sortkeys(1);
$res = $marshall->Dump . "\n";

return $res;
Expand Down
2 changes: 1 addition & 1 deletion lib/Autom4te/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ sub marshall($)

# CALLER is an object: instance method.
my $marshall = Data::Dumper->new ([$caller]);
$marshall->Indent(2)->Terse(0);
$marshall->Indent(2)->Terse(0)->Sortkeys(1);
$res = $marshall->Dump . "\n";

return $res;
Expand Down

0 comments on commit c2ab755

Please sign in to comment.