PERL PERL5 CHANGES 10 CHANGE 23257 UPGRADE TO VERSION 0 42
Date: Thu, 2 Sep 2004 08:30:00 -0700

Subject: Change 23257: Upgrade to version 0.42.
From: rgarciasuarez@no-spam (Rafael Garcia-Suarez)

Change 23257 by rgs@no-spam on 2004/09/02 15:01:39

Upgrade to version 0.42.
From:
Subject: CPAN Upload: J/JP/JPEACOCK/version-0.42.tar.gz From: John Peacock <jpeacock@no-spam>
Date: Wed, 18 Aug 2004 08:26:35 -0400
Message-ID: <41234AFB.1020009@no-spam>

Affected files ...

... //depot/perl/lib/version.pm#10 edit ... //depot/perl/lib/version.t#9 edit ... //depot/perl/util.c#425 edit
Differences ...

==== //depot/perl/lib/version.pm#10 (text) ====
Index: perl/lib/version.pm --- perl/lib/version.pm#9~23088~ Tue Jul 13 01:27:11 2004
+++ perl/lib/version.pm Thu Sep 2 08:01:39 2004
@@no-spam -12,7 +12,7 @@no-spam @no-spam = qw(qv);
-$VERSION = 0.41; # stop using CVS and switch to subversion +$VERSION = 0.42; # stop using CVS and switch to subversion $CLASS = 'version';

==== //depot/perl/lib/version.t#9 (text) ====
Index: perl/lib/version.t --- perl/lib/version.t#8~23088~ Tue Jul 13 01:27:11 2004
+++ perl/lib/version.t Thu Sep 2 08:01:39 2004
@@no-spam -48,7 +48,7 @@no-spam # Test quoted number processing diag "tests with quoted numbers" unless $ENV{PERL_CORE};
$version = $CLASS->new("5.005_03");
- is ( "$version" , "5.5_30" , '"5.005_03" eq "5.5_30"' );
+ is ( "$version" , "5.005_030" , '"5.005_03" eq "5.005_030"' );
$version = $CLASS->new("v1.23");
is ( "$version" , "1.23.0" , '"v1.23" eq "1.23.0"' );


==== //depot/perl/util.c#425 (text) ====
Index: perl/util.c --- perl/util.c#424~23198~ Fri Aug 6 03:06:46 2004
+++ perl/util.c Thu Sep 2 08:01:39 2004
@@no-spam -3934,7 +3934,7 @@no-spam * floating point number, i.e. not quoted in any way */
if ( !qv && s > start+1 && saw_period == 1 ) {
- mult *= 100;
+ mult *= 100;
while ( s < end ) {
orev = rev;
rev += (*s - '0') * mult;
@@no-spam -3983,7 +3983,7 @@no-spam */
len = 2 - len;
while (len-- > 0)
- av_push((AV *)sv, newSViv(0));
+ av_push((AV *)sv, newSViv(0));
}
return s;
}
@@no-spam -4117,10 +4117,11 @@no-spam if ( len > 0 )
{
digit = SvIVX(*av_fetch((AV *)vs, len, 0));
-
- /* Don't display any additional trailing zeros */
if ( (int)PERL_ABS(digit) != 0 || len == 1 )
{
+ if ( digit < 0 ) /* alpha version */
+ Perl_sv_catpv(aTHX_ sv,"_");
+ /* Don't display additional trailing zeros */
Perl_sv_catpvf(aTHX_ sv,"%03d", (int)PERL_ABS(digit));
}
}
@@no-spam -4191,12 +4192,13 @@no-spam SV *
Perl_vstringify(pTHX_ SV *vs)
{
- I32 len;
+ I32 len, digit;
if ( SvROK(vs) )
vs = SvRV(vs);
len = av_len((AV *)vs);
+ digit = SvIVX(*av_fetch((AV *)vs, len, 0));
- if ( len < 2 )
+ if ( len < 2 || ( len == 2 && digit < 0 ) )
return vnumify(vs);
else return vnormal(vs);
End of Patch.