[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-module-build
Subject: [PATCH] Bring internal version class into line with current code
From: John Peacock <john.peacock () havurah-software ! org>
Date: 2008-07-11 0:56:01
Message-ID: 4876AFA1.3070604 () havurah-software ! org
[Download RAW message or body]
Attached please find a patch to bring Module::Build's embedded version object
class into line with what will shortly be released to CPAN as 0.76. The issue
that was noticed was distros like this:
http://www.cpan.org/pub/CPAN/authors/id/K/KR/KRUSCOE/Tie-DxHash-v1.0.0.meta
that don't have an "original" hash value would cause Perl 5.10.0 to segfault.
John
["version-0.76.patch" (text/x-patch)]
=== lib/Module/Build/Version.pm
==================================================================
--- lib/Module/Build/Version.pm (revision 2222)
+++ lib/Module/Build/Version.pm (local)
@@ -74,7 +74,7 @@
use locale;
use vars qw ($VERSION @ISA @REGEXS);
-$VERSION = 0.74;
+$VERSION = 0.76;
push @REGEXS, qr/
^v? # optional leading 'v'
@@ -426,7 +426,11 @@
require Carp;
Carp::croak("Invalid version object");
}
- return $self->{original};
+ return exists $self->{original}
+ ? $self->{original}
+ : exists $self->{qv}
+ ? $self->normal
+ : $self->numify;
}
sub vcmp
@@ -557,7 +561,8 @@
# Thanks to Yitzchak Scott-Thoennes for this mode of operation
{
local $^W;
- *UNIVERSAL::VERSION = sub {
+ *UNIVERSAL::VERSION # Module::Build::ModuleInfo doesn't see this now
+ = sub {
my ($obj, $req) = @_;
my $class = ref($obj) || $obj;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic