]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
autoconf: store autom4te request keys in sorted order
authorSergei Trofimovich <slyich@gmail.com>
Fri, 9 Sep 2022 22:04:02 +0000 (17:04 -0500)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 9 Sep 2022 22:51:25 +0000 (17:51 -0500)
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

lib/Autom4te/C4che.pm
lib/Autom4te/Request.pm

index 8b7c3c117cf7fc308985e8750bc44ee45f1d4e46..e956180948e5cd01a4aa0213b3d9d0da413d60db 100644 (file)
@@ -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;
index c137ef2162fae924cd2c01f4961cc379b128048b..1b922f7da962be210bf1c518569bf309883288c4 100644 (file)
@@ -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;