From: John Peacock Date: Mon, 12 Jul 2004 23:16:51 +0000 (-0400) Subject: was Re: UNIVERSAL::VERSION causing "Use of uninitialized value..." warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2397f31c862eda39e662addb6f45fa6fe0550fe;p=p5sagit%2Fp5-mst-13.2.git was Re: UNIVERSAL::VERSION causing "Use of uninitialized value..." warning Message-ID: <40F35423.5080304@rowman.com> p4raw-id: //depot/perl@23088 --- diff --git a/lib/version.pm b/lib/version.pm index 5d1b4f2..3969544 100644 --- a/lib/version.pm +++ b/lib/version.pm @@ -12,7 +12,7 @@ use vars qw(@ISA $VERSION $CLASS @EXPORT); @EXPORT = qw(qv); -$VERSION = 0.39; # stop using CVS and switch to subversion +$VERSION = 0.41; # stop using CVS and switch to subversion $CLASS = 'version'; diff --git a/lib/version.t b/lib/version.t index c91d988..b9dbf04 100644 --- a/lib/version.t +++ b/lib/version.t @@ -4,7 +4,7 @@ ######################### -use Test::More tests => 168; +use Test::More tests => 170; diag "Tests with base class" unless $ENV{PERL_CORE}; @@ -222,6 +222,8 @@ sub BaseTests { diag "testing CVS Revision" unless $ENV{PERL_CORE}; $version = new version qw$Revision: 1.2$; ok ( $version eq "1.2.0", 'qw$Revision: 1.2$ eq 1.2.0' ); + $version = new version qw$Revision: 1.2.3.4$; + ok ( $version eq "1.2.3.4", 'qw$Revision: 1.2.3.4$ eq 1.2.3.4' ); # test reformed UNIVERSAL::VERSION diag "Replacement UNIVERSAL::VERSION tests" unless $ENV{PERL_CORE}; diff --git a/util.c b/util.c index d145262..ad6d401 100644 --- a/util.c +++ b/util.c @@ -3962,7 +3962,7 @@ Perl_scan_version(pTHX_ char *s, SV *rv, bool qv) } if ( qv ) { /* quoted versions always become full version objects */ I32 len = av_len((AV *)sv); - for ( len = 2 - len; len != 0; len-- ) + for ( len = 2 - len; len > 0; len-- ) av_push((AV *)sv, newSViv(0)); } return s;