[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] autoconf: store autom4te request keys in sorted order
From: |
Sergei Trofimovich |
Subject: |
[PATCH] autoconf: store autom4te request keys in sorted order |
Date: |
Sun, 1 Aug 2021 13:58:11 +0100 |
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.
---
lib/Autom4te/C4che.pm | 2 +-
lib/Autom4te/Request.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Autom4te/C4che.pm b/lib/Autom4te/C4che.pm
index f5164811..6472f9f8 100644
--- a/lib/Autom4te/C4che.pm
+++ b/lib/Autom4te/C4che.pm
@@ -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;
diff --git a/lib/Autom4te/Request.pm b/lib/Autom4te/Request.pm
index 67a60074..177aef24 100644
--- a/lib/Autom4te/Request.pm
+++ b/lib/Autom4te/Request.pm
@@ -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;
--
2.32.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] autoconf: store autom4te request keys in sorted order,
Sergei Trofimovich <=