[PATCH] ignore insignificant version discrepancies between Carp and Carp::Heavy #13708
Comments
From @karenetheridgePatch was prepared via "git format-patch -1", and is included as an attachment. |
From @karenetheridge0001-Ignore-mismatched-versions-between-Carp-and-Carp-Hea.patchFrom c3dd9ac76b130c389310f61b04892c7bbdb047a2 Mon Sep 17 00:00:00 2001
From: Karen Etheridge <ether@cpan.org>
Date: Thu, 3 Apr 2014 11:08:20 -0700
Subject: [PATCH] Ignore mismatched versions between Carp and Carp::Heavy if
the version discrepancy does not actually lead to broken code
Carp::Heavy's guts were merged into Carp in 1.12. After this point, if a
different version of Carp::Heavy is loaded than Carp, no harm will be done and
the error can be ignored.
---
dist/Carp/lib/Carp.pm | 2 +-
dist/Carp/lib/Carp/Heavy.pm | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 24c0cd1..99b6945 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -87,7 +87,7 @@ BEGIN {
}
}
-our $VERSION = '1.33';
+our $VERSION = '1.34';
our $MaxEvalLen = 0;
our $Verbose = 0;
diff --git a/dist/Carp/lib/Carp/Heavy.pm b/dist/Carp/lib/Carp/Heavy.pm
index 5e13cb2..ebd23d6 100644
--- a/dist/Carp/lib/Carp/Heavy.pm
+++ b/dist/Carp/lib/Carp/Heavy.pm
@@ -2,10 +2,13 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.33';
+our $VERSION = '1.34';
+# Carp::Heavy was merged into Carp in version 1.12.
+# Any mismatched versions after this point are not significant and can be
+# ignored.
my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";
-if($cv ne $VERSION) {
+if($cv ne $VERSION and ($cv lt '1.12' or $VERSION lt '1.12')) {
die "Version mismatch between Carp $cv ($INC{q(Carp.pm)}) and Carp::Heavy $VERSION ($INC{q(Carp/Heavy.pm)}). Did you alter \@INC after Carp was loaded?\n";
}
--
1.8.5.4
|
From zefram@fysh.orgKaren Etheridge wrote:
$VERSION can't be lt 1.12, having been set earlier in the same file to a if (($Carp::VERSION || 0) < 1.12) { -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @karenetheridgeAgreed. I'll attach a new patch. On Thu, Apr 03, 2014 at 07:55:48PM +0100, Zefram wrote:
|
From @karenetheridgeBetter patch attached. Thanks, Zefram! |
From @karenetheridge0001-Ignore-mismatched-versions-between-Carp-and-Carp-Hea.patchFrom 90216e5dc2f8bccd094a859e697ea4cdbaa19830 Mon Sep 17 00:00:00 2001
From: Karen Etheridge <ether@cpan.org>
Date: Thu, 3 Apr 2014 11:08:20 -0700
Subject: [PATCH] Ignore mismatched versions between Carp and Carp::Heavy if
the version discrepancy does not actually lead to broken code
Carp::Heavy's guts were merged into Carp in 1.12. After this point, if a
different version of Carp::Heavy is loaded than Carp, no harm will be done and
the error can be ignored.
---
dist/Carp/lib/Carp.pm | 2 +-
dist/Carp/lib/Carp/Heavy.pm | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 24c0cd1..99b6945 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -87,7 +87,7 @@ BEGIN {
}
}
-our $VERSION = '1.33';
+our $VERSION = '1.34';
our $MaxEvalLen = 0;
our $Verbose = 0;
diff --git a/dist/Carp/lib/Carp/Heavy.pm b/dist/Carp/lib/Carp/Heavy.pm
index 5e13cb2..3ca266e 100644
--- a/dist/Carp/lib/Carp/Heavy.pm
+++ b/dist/Carp/lib/Carp/Heavy.pm
@@ -2,10 +2,12 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.33';
+our $VERSION = '1.34';
-my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";
-if($cv ne $VERSION) {
+# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
+# after this point are not significant and can be ignored.
+if(($Carp::VERSION || 0) < 1.12)) {
+ my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";
die "Version mismatch between Carp $cv ($INC{q(Carp.pm)}) and Carp::Heavy $VERSION ($INC{q(Carp/Heavy.pm)}). Did you alter \@INC after Carp was loaded?\n";
}
--
1.8.5.4
|
From @karenetheridgeHorrible parenthetical error fixed. |
From @karenetheridge0001-Ignore-mismatched-versions-between-Carp-and-Carp-Hea.patchFrom 90216e5dc2f8bccd094a859e697ea4cdbaa19830 Mon Sep 17 00:00:00 2001
From: Karen Etheridge <ether@cpan.org>
Date: Thu, 3 Apr 2014 11:08:20 -0700
Subject: [PATCH] Ignore mismatched versions between Carp and Carp::Heavy if
the version discrepancy does not actually lead to broken code
Carp::Heavy's guts were merged into Carp in 1.12. After this point, if a
different version of Carp::Heavy is loaded than Carp, no harm will be done and
the error can be ignored.
---
dist/Carp/lib/Carp.pm | 2 +-
dist/Carp/lib/Carp/Heavy.pm | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 24c0cd1..99b6945 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -87,7 +87,7 @@ BEGIN {
}
}
-our $VERSION = '1.33';
+our $VERSION = '1.34';
our $MaxEvalLen = 0;
our $Verbose = 0;
diff --git a/dist/Carp/lib/Carp/Heavy.pm b/dist/Carp/lib/Carp/Heavy.pm
index 5e13cb2..3ca266e 100644
--- a/dist/Carp/lib/Carp/Heavy.pm
+++ b/dist/Carp/lib/Carp/Heavy.pm
@@ -2,10 +2,12 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.33';
+our $VERSION = '1.34';
-my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";
-if($cv ne $VERSION) {
+# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
+# after this point are not significant and can be ignored.
+if(($Carp::VERSION || 0) < 1.12) {
+ my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";
die "Version mismatch between Carp $cv ($INC{q(Carp.pm)}) and Carp::Heavy $VERSION ($INC{q(Carp/Heavy.pm)}). Did you alter \@INC after Carp was loaded?\n";
}
--
1.8.5.4
|
From @tonycozOn Thu Apr 03 12:22:49 2014, ether wrote:
This looks sane to me, added as a 5.21.1 blocker since blead is frozen. Tony |
@tonycoz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#121574 (status was 'resolved')
Searchable as RT121574$
The text was updated successfully, but these errors were encountered: