From: John Peacock Date: Mon, 22 May 2006 19:08:03 +0000 (-0400) Subject: Re: [PATCH - DUH] Synchronize bleadperl with version-0.60 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0b17f21fab4979f8ef6bccb58a7d0fe471b35e3;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH - DUH] Synchronize bleadperl with version-0.60 Message-ID: <44724453.5090606@rowman.com> p4raw-id: //depot/perl@28288 --- diff --git a/lib/version.pm b/lib/version.pm index dcf5804..3fcb6b1 100644 --- a/lib/version.pm +++ b/lib/version.pm @@ -6,7 +6,7 @@ use strict; use vars qw(@ISA $VERSION $CLASS *qv); -$VERSION = "0.60_01"; +$VERSION = "0.60_02"; $VERSION = eval($VERSION); $CLASS = 'version'; @@ -18,7 +18,9 @@ sub import { no strict 'refs'; *{$callpkg."::qv"} = - sub {return bless version::qv(shift), $class }; + sub {return bless version::qv(shift), $class } + unless $callpkg->can('qv'); + } 1; diff --git a/lib/version.t b/lib/version.t index 05c0965..055531c 100644 --- a/lib/version.t +++ b/lib/version.t @@ -57,6 +57,12 @@ eval { my $test = $testobj > 1.0 }; like($@, qr/Invalid version object/, "Bad subclass vcmp"); +# dummy up a redundant call to satify David Wheeler +local $SIG{__WARN__} = sub { die $_[0] }; +eval 'use version;'; +unlike ($@, qr/^Subroutine main::qv redefined/, + "Only export qv once per package (to prevent redefined warnings)."); + sub BaseTests { my ($CLASS, $no_qv) = @_;