Skip to content

Commit

Permalink
Ignore mismatched versions between Carp and Carp::Heavy if the versio…
Browse files Browse the repository at this point in the history
…n 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.
  • Loading branch information
karenetheridge authored and tonycoz committed May 28, 2014
1 parent 30536d4 commit a18468a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/Carp/lib/Carp.pm
Expand Up @@ -87,7 +87,7 @@ BEGIN {
}
}

our $VERSION = '1.3301';
our $VERSION = '1.34';

our $MaxEvalLen = 0;
our $Verbose = 0;
Expand Down
8 changes: 5 additions & 3 deletions dist/Carp/lib/Carp/Heavy.pm
Expand Up @@ -2,10 +2,12 @@ package Carp::Heavy;

use Carp ();

our $VERSION = '1.3301';
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";
}

Expand Down

0 comments on commit a18468a

Please sign in to comment.