FAQ
Agreed. I'll attach a new patch.
On Thu, Apr 03, 2014 at 07:55:48PM +0100, Zefram wrote:
Karen Etheridge wrote:
my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";
+if($cv ne $VERSION and ($cv lt '1.12' or $VERSION lt '1.12')) {
$VERSION can't be lt 1.12, having been set earlier in the same file to a
higher version. $cv lt 1.12 mishandles the undef case. $cv ne $VERSION
is redundant with the lt check. String comparisons are not correct for
inequality comparisons of version numbers. You want something like

if (($Carp::VERSION || 0) < 1.12) {
my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";

-zefram

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 7 | next ›
Discussion Overview
groupperl5-porters @
categoriesperl
postedApr 3, '14 at 6:29p
activeMay 28, '14 at 5:14a
posts7
users3
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase