Skip Menu |

This queue is for tickets about the version CPAN distribution.

Report information
The Basics
Id: 87513
Status: resolved
Priority: 0/
Queue: version

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.9902
Fixed in: (no value)



Subject: Sync CPAN release with bleadperl
version.pm, version.pod, Internals.pod and nearly all of the test files have drifted out of sync in bleadperl versus the latest CPAN release (0.9902) of version. The attached patch syncs 0.9902 with bleadperl. Please could you consider applying it and rolling a new CPAN release to get things back in sync, or else instruct perl5-porters how to change bleadperl if you would rather that end of things be changed instead. It's not urgent, but I would be very grateful if you were able to do this by 20th August when the next Perl release is due.
Subject: sync-with-blead.patch

Message body is not shown because it is too large.

On Thu Aug 01 08:49:41 2013, SHAY wrote: Show quoted text
> version.pm, version.pod, Internals.pod and nearly all of the test > files have drifted out of sync in bleadperl versus the latest CPAN > release (0.9902) of version.
Not exactly. The code in bleadperl has always been an adaptation of what ships in the CPAN release. Specifically, the extra $Verbose logging lines have always been completely suppressed when run under PERL_CORE. Also, the version.pm block to figure out whether to load vxs or vpp as the backing class is not needed in the core. I'm releasing 0.9903 to CPAN shortly with a few tweaks and I'll submit a patch to p5p to get things much closer in sync. Mostly it is whitespace changes (eliminating trailing whitespace and modifying some lines to be 4space/tab compliant). I also figured out a way for the tests to be completely identical, so this was a good exercise. Thanks for the report
On Fri Aug 16 08:09:55 2013, JPEACOCK wrote: Show quoted text
> I'm releasing 0.9903 to CPAN shortly with a few tweaks and I'll submit > a patch to p5p to get things much closer in sync. Mostly it is > whitespace changes (eliminating trailing whitespace and modifying some > lines to be 4space/tab compliant). I also figured out a way for the > tests to be completely identical, so this was a good exercise.
Patch submitted to p5p http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2013-08/msg00701.html
On Mon Aug 19 06:38:27 2013, JPEACOCK wrote: Show quoted text
The patch you supplied misses one part of http://perl5.git.perl.org/perl.git/commit/3fca3d61b552b8da4cb82e43e9eac517631ef737 and all of http://perl5.git.perl.org/perl.git/commit/02aba72f9af3ac175d1dfacad3955de025cd7130 I have preserved those changes in blead, and the attached patch against 0.9903 will sync this up for you. I've also made a minor whitespace change in version.pm to remove a tab after spaces (which Git objects to otherwise); that is also included in this patch. Please could you roll a 0.9904 soon with these changes. It may be too late for 5.19.3 now (my fault for not having spotted your patch!) but that's ok.
Subject: sync-with-blead-again.patch
diff -ruN version-0.9903.orig/lib/version.pm version-0.9903/lib/version.pm --- version-0.9903.orig/lib/version.pm 2013-08-18 14:57:32.000000000 +0100 +++ version-0.9903/lib/version.pm 2013-08-19 13:04:37.504983400 +0100 @@ -171,7 +171,7 @@ map { $args{$_} = 1 } @_ } else { # no parameters at all on use line - %args = + %args = ( qv => 1, 'UNIVERSAL::VERSION' => 1, diff -ruN version-0.9903.orig/t/07locale.t version-0.9903/t/07locale.t --- version-0.9903.orig/t/07locale.t 2013-08-15 12:11:38.000000000 +0100 +++ version-0.9903/t/07locale.t 2013-08-19 12:26:17.088407100 +0100 @@ -7,7 +7,7 @@ use File::Basename; use File::Temp qw/tempfile/; use POSIX qw/locale_h/; -use Test::More tests => 9; +use Test::More tests => 7; use Config; my $Verbose; @@ -16,8 +16,8 @@ } SKIP: { - skip 'No locale testing for Perl < 5.6.0', 8 if $] < 5.006; - skip 'No locale testing without d_setlocale', 8 + skip 'No locale testing for Perl < 5.6.0', 6 if $] < 5.006; + skip 'No locale testing without d_setlocale', 6 if(!$Config{d_setlocale}); # test locale handling @@ -39,26 +39,19 @@ $loc = setlocale( LC_ALL, $_); last if localeconv()->{decimal_point} eq ','; } - skip 'Cannot test locale handling without a comma locale', 7 + skip 'Cannot test locale handling without a comma locale', 5 unless $loc and localeconv()->{decimal_point} eq ','; diag ("Testing locale handling with $loc") if $Verbose; setlocale(LC_NUMERIC, $loc); - ok ("$ver eq '1,23'", "Using locale: $loc"); + ok ($ver eq "1,23", "Using locale: $loc"); $v = version->new($ver); unlike($warning, qr/Version string '1,23' contains invalid data/, "Process locale-dependent floating point"); ok ($v eq "1.23", "Locale doesn't apply to version objects"); ok ($v == $ver, "Comparison to locale floating point"); - { - no locale; - ok ("$ver eq '1.23'", "Outside of scope of use locale"); - } - ok("\"$ver\"+1 gt 2.22" && \"$ver\"+1 lt 2.24", - "Can do math when radix is not a dot"); # [perl 115800] - setlocale( LC_ALL, $orig_loc); # reset this before possible skip skip 'Cannot test RT#46921 with Perl < 5.008', 1 if ($] < 5.008);
On Mon Aug 19 08:23:39 2013, SHAY wrote: Show quoted text
> On Mon Aug 19 06:38:27 2013, JPEACOCK wrote:
> > Patch submitted to p5p > > > > http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2013- > > 08/msg00701.html > >
> > The patch you supplied misses one part of > > http://perl5.git.perl.org/perl.git/commit/3fca3d61b552b8da4cb82e43e9eac517631ef737 > > and all of > > http://perl5.git.perl.org/perl.git/commit/02aba72f9af3ac175d1dfacad3955de025cd7130 > > I have preserved those changes in blead, and the attached patch > against 0.9903 will sync this up for you. I've also made a minor > whitespace change in version.pm to remove a tab after spaces (which > Git objects to otherwise); that is also included in this patch. >
Unfortunately, I had problems running the core perl test suite: the version tests were all running with the $Verbose flag set, causing lots of output which is not supposed to appear. I think the problems are two-fold: Firstly, the scripts all declare a lexical variable called $Verbose, which will not be affected by the use of a (package variable) typeglob in coretests.pm in the way that was presumably intended. I've therefore changed "my $Verbose" to "our $Verbose" throughout (and removed it from one test script which didn't use it anyway). Secondly, coretests.pm was assigning 0 to *Verbose rather than to $Verbose, which resulted in $0 getting assigned to $Verbose, which was not at all what was wanted: this is what caused the noisy output, since $0 tests as "true". The changes are in this core commit: http://perl5.git.perl.org/perl.git/commit/aed68192dd281f264ca1b61138be853d571f4340 These fixes, plus the changes I sent a couple of hours ago, are all in the new patch attached here. Please can you take a look and check that I've done this correctly, and roll a 0.9904 sometime if all looks well.
Subject: sync-with-blead-again-2.patch
diff -ruN version-0.9903.orig/lib/version.pm version-0.9903/lib/version.pm --- version-0.9903.orig/lib/version.pm 2013-08-18 14:57:32.000000000 +0100 +++ version-0.9903/lib/version.pm 2013-08-19 13:04:37.504983400 +0100 @@ -171,7 +171,7 @@ map { $args{$_} = 1 } @_ } else { # no parameters at all on use line - %args = + %args = ( qv => 1, 'UNIVERSAL::VERSION' => 1, diff -ruN version-0.9903.orig/t/01base.t version-0.9903/t/01base.t --- version-0.9903.orig/t/01base.t 2013-08-15 12:15:38.000000000 +0100 +++ version-0.9903/t/01base.t 2013-08-19 15:21:48.550772300 +0100 @@ -5,7 +5,7 @@ ######################### use Test::More qw/no_plan/; -my $Verbose; +our $Verbose; BEGIN { (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm'; diff -ruN version-0.9903.orig/t/02derived.t version-0.9903/t/02derived.t --- version-0.9903.orig/t/02derived.t 2013-08-15 12:11:38.000000000 +0100 +++ version-0.9903/t/02derived.t 2013-08-19 15:26:40.236455800 +0100 @@ -6,7 +6,7 @@ use Test::More qw/no_plan/; use File::Temp qw/tempfile/; -my $Verbose; +our $Verbose; BEGIN { (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm'; diff -ruN version-0.9903.orig/t/03require.t version-0.9903/t/03require.t --- version-0.9903.orig/t/03require.t 2013-08-15 12:11:38.000000000 +0100 +++ version-0.9903/t/03require.t 2013-08-19 15:26:50.268029500 +0100 @@ -5,7 +5,7 @@ ######################### use Test::More qw/no_plan/; -my $Verbose; +our $Verbose; BEGIN { (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm'; diff -ruN version-0.9903.orig/t/04strict_lax.t version-0.9903/t/04strict_lax.t --- version-0.9903.orig/t/04strict_lax.t 2013-08-15 12:11:38.000000000 +0100 +++ version-0.9903/t/04strict_lax.t 2013-08-19 15:27:34.915583200 +0100 @@ -5,7 +5,6 @@ ######################### use Test::More qw/no_plan/; -my $Verbose; # do strict lax tests in a sub to isolate a package to test importing SKIP: { diff -ruN version-0.9903.orig/t/07locale.t version-0.9903/t/07locale.t --- version-0.9903.orig/t/07locale.t 2013-08-15 12:11:38.000000000 +0100 +++ version-0.9903/t/07locale.t 2013-08-19 15:27:25.252030500 +0100 @@ -7,17 +7,17 @@ use File::Basename; use File::Temp qw/tempfile/; use POSIX qw/locale_h/; -use Test::More tests => 9; +use Test::More tests => 7; use Config; -my $Verbose; +our $Verbose; BEGIN { use_ok('version', 0.9903); } SKIP: { - skip 'No locale testing for Perl < 5.6.0', 8 if $] < 5.006; - skip 'No locale testing without d_setlocale', 8 + skip 'No locale testing for Perl < 5.6.0', 6 if $] < 5.006; + skip 'No locale testing without d_setlocale', 6 if(!$Config{d_setlocale}); # test locale handling @@ -39,26 +39,19 @@ $loc = setlocale( LC_ALL, $_); last if localeconv()->{decimal_point} eq ','; } - skip 'Cannot test locale handling without a comma locale', 7 + skip 'Cannot test locale handling without a comma locale', 5 unless $loc and localeconv()->{decimal_point} eq ','; diag ("Testing locale handling with $loc") if $Verbose; setlocale(LC_NUMERIC, $loc); - ok ("$ver eq '1,23'", "Using locale: $loc"); + ok ($ver eq "1,23", "Using locale: $loc"); $v = version->new($ver); unlike($warning, qr/Version string '1,23' contains invalid data/, "Process locale-dependent floating point"); ok ($v eq "1.23", "Locale doesn't apply to version objects"); ok ($v == $ver, "Comparison to locale floating point"); - { - no locale; - ok ("$ver eq '1.23'", "Outside of scope of use locale"); - } - ok("\"$ver\"+1 gt 2.22" && \"$ver\"+1 lt 2.24", - "Can do math when radix is not a dot"); # [perl 115800] - setlocale( LC_ALL, $orig_loc); # reset this before possible skip skip 'Cannot test RT#46921 with Perl < 5.008', 1 if ($] < 5.008); diff -ruN version-0.9903.orig/t/coretests.pm version-0.9903/t/coretests.pm --- version-0.9903.orig/t/coretests.pm 2013-08-15 12:13:00.000000000 +0100 +++ version-0.9903/t/coretests.pm 2013-08-19 15:21:38.520198600 +0100 @@ -2,7 +2,7 @@ package main; require Test::Harness; *Verbose = \$Test::Harness::Verbose; -*Verbose = 0 if $ENV{PERL_CORE}; +$Verbose = 0 if $ENV{PERL_CORE}; use Data::Dumper; use File::Temp qw/tempfile/; use File::Basename;
Events have overtaken this ticket. Blead and CPAN are now in sync, and the last patch on this ticket was not necessary ($Verbose has been removed completely).