From c0b17f21fab4979f8ef6bccb58a7d0fe471b35e3 Mon Sep 17 00:00:00 2001 From: John Peacock Date: Mon, 22 May 2006 15:08:03 -0400 Subject: [PATCH] Re: [PATCH - DUH] Synchronize bleadperl with version-0.60 Message-ID: <44724453.5090606@rowman.com> p4raw-id: //depot/perl@28288 --- lib/version.pm | 6 ++++-- lib/version.t | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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) = @_; -- 2.7.4