|
|
987c36c |
From fcc5bac3264420de0203589753b732da1dbc27bb Mon Sep 17 00:00:00 2001
|
|
|
987c36c |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
987c36c |
Date: Wed, 14 May 2014 16:42:24 +0200
|
|
|
987c36c |
Subject: [PATCH] Sort inconsistent declarations for error message
|
|
|
987c36c |
MIME-Version: 1.0
|
|
|
987c36c |
Content-Type: text/plain; charset=UTF-8
|
|
|
987c36c |
Content-Transfer-Encoding: 8bit
|
|
|
987c36c |
|
|
|
987c36c |
Random hash key ordering casues test failures. It's also good to have
|
|
|
987c36c |
stable output for human error messages.
|
|
|
987c36c |
|
|
|
987c36c |
https://rt.cpan.org/Public/Bug/Display.html?id=95642
|
|
|
987c36c |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
987c36c |
---
|
|
|
987c36c |
lib/Class/AutoClass.pm | 2 +-
|
|
|
987c36c |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
987c36c |
|
|
|
987c36c |
diff --git a/lib/Class/AutoClass.pm b/lib/Class/AutoClass.pm
|
|
|
987c36c |
index 1d7337a..83fd07a 100644
|
|
|
987c36c |
--- a/lib/Class/AutoClass.pm
|
|
|
987c36c |
+++ b/lib/Class/AutoClass.pm
|
|
|
987c36c |
@@ -530,7 +530,7 @@ sub declare {
|
|
|
987c36c |
@cattributes_recursive{keys %cattributes}=values %cattributes;
|
|
|
987c36c |
push(@attributes_recursive,keys %iattributes,keys %cattributes);
|
|
|
987c36c |
# are all these declarations consistent?
|
|
|
987c36c |
- if (my @inconsistents=grep {exists $cattributes_recursive{$_}} keys %iattributes_recursive) {
|
|
|
987c36c |
+ if (my @inconsistents=sort grep {exists $cattributes_recursive{$_}} keys %iattributes_recursive) {
|
|
|
987c36c |
# inconsistent class vs. instance declarations
|
|
|
987c36c |
my @errstr=("Inconsistent declarations for attribute(s) @inconsistents");
|
|
|
987c36c |
map {
|
|
|
987c36c |
--
|
|
|
987c36c |
1.9.0
|
|
|
987c36c |
|