Skip Menu |

This queue is for tickets about the Test-More-Prefix CPAN distribution.

Report information
The Basics
Id: 90361
Status: resolved
Priority: 0/
Queue: Test-More-Prefix

People
Owner: Nobody in particular
Requestors: chisel [...] chizography.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.003
Fixed in: (no value)



Subject: TB2:: tests should be ignored for $version < 1.005 (not 1)
Trying to install with Test-Simple-1.001002 I'm getting errors (see the end of this ticket for the terminal output). Talking it through in IRC: 15:37 < chisel> I think Test::More::Prefix is broken [with Test::Builder/Test::Simple >= 1.0]. https://metacpan.org/source/SARGIE/Test-More-Prefix-0.003/lib/Test/More/Prefix/TB2.pm#L27 has 'use TB2::Mouse::Role;' which doesn't seem to exist anywhere. Can anyone confirm I'm not going insane here? 15:40 < ilmari> if ( $version > 1 ) { 15:40 < ilmari> require Test::More::Prefix::TB2; 15:40 < chisel> yes I know /why/ it's using it 15:40 < chisel> the branch I'm building has Test-Simple-1.001002 15:40 < ilmari> that should be $version >= 1.005 15:41 < chisel> oh, how come? what are you looking at? 15:42 < ilmari> TB2 == Test-Simple-1.005000_* 15:43 < chisel> Test-Simple-1.001002 Nov 04, 2013; Test-Simple-1.005000_006 Apr 12, 2013 ... weird release dates 15:43 < ilmari> independent branches 15:44 < ilmari> https://metacpan.org/source/MSCHWERN/Test-Simple-1.005000_005/lib/TB2/Mouse.pm Writing Makefile for Test::More::Prefix Writing MYMETA.yml and MYMETA.json cp lib/Test/More/Prefix/TB1.pm blib/lib/Test/More/Prefix/TB1.pm cp lib/Test/More/Prefix/TB2.pm blib/lib/Test/More/Prefix/TB2.pm cp lib/Test/More/Prefix.pm blib/lib/Test/More/Prefix.pm NETAPORTER/Test-More-Prefix-0.003.tar.gz /usr/bin/make -j 3 -j 3 -- OK Running make test PERL_DL_NONLAZY=1 /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t Can't locate TB2/Mouse/Role.pm in @INC (you may need to install the TB2::Mouse::Role module) (@INC contains: /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/arch /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1 /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1 /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1 /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1 %opt%xt%xt-perl/lib/site_perl/5.18.1/x86_64-linux %opt%xt%xt-perl/lib/site_perl/5.18.1 %opt%xt%xt-perl/lib/5.18.1/x86_64-linux %opt%xt%xt-perl/lib/5.18.1 .) at /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib/Test/More/Prefix/TB2.pm line 27. BEGIN failed--compilation aborted at /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib/Test/More/Prefix/TB2.pm line 27. Compilation failed in require at /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib/Test/More/Prefix.pm line 67. BEGIN failed--compilation aborted at t/010_test_builder_0.t line 8. t/010_test_builder_0.t .. Dubious, test returned 2 (wstat 512, 0x200) No subtests run Can't locate TB2/Mouse/Role.pm in @INC (you may need to install the TB2::Mouse::Role module) (@INC contains: /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/arch /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1 /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1 /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/site_perl/5.18.1 /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1/x86_64-linux /disk/jkns/workspace/perl-nap-CPAN/build/tmp/perl-nap-5.18.1-2013.518.351.cpan_updates-build/opt/xt/xt-perl/lib/5.18.1 %opt%xt%xt-perl/lib/site_perl/5.18.1/x86_64-linux %opt%xt%xt-perl/lib/site_perl/5.18.1 %opt%xt%xt-perl/lib/5.18.1/x86_64-linux %opt%xt%xt-perl/lib/5.18.1 .) at /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib/Test/More/Prefix/TB2.pm line 27. BEGIN failed--compilation aborted at /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib/Test/More/Prefix/TB2.pm line 27. Compilation failed in require at /disk/jkns/workspace/perl-nap-CPAN/build/dot_cpan/build/Test-More-Prefix-0.003-qrAnbi/blib/lib/Test/More/Prefix.pm line 67. BEGIN failed--compilation aborted at t/020_test_builder_2.t line 7. t/020_test_builder_2.t ..
I think this patch will resolve the issue
Subject: tb2.patch
diff -Naur Test-More-Prefix-0.003.orig/lib/Test/More/Prefix.pm Test-More-Prefix-0.003/lib/Test/More/Prefix.pm --- Test-More-Prefix-0.003.orig/lib/Test/More/Prefix.pm 2013-11-14 15:52:16.000000000 +0000 +++ Test-More-Prefix-0.003/lib/Test/More/Prefix.pm 2013-11-14 15:52:47.000000000 +0000 @@ -63,7 +63,7 @@ sub import { my ( $class, @args ) = @_; my $version = $Test::Builder::VERSION; - if ( $version > 1 ) { + if ( $version >= 1.005 ) { require Test::More::Prefix::TB2; Test::More::Prefix::TB2->import(@args); } else { diff -Naur Test-More-Prefix-0.003.orig/t/010_test_builder_0.t Test-More-Prefix-0.003/t/010_test_builder_0.t --- Test-More-Prefix-0.003.orig/t/010_test_builder_0.t 2013-11-14 15:52:16.000000000 +0000 +++ Test-More-Prefix-0.003/t/010_test_builder_0.t 2013-11-14 15:53:17.000000000 +0000 @@ -7,7 +7,7 @@ use Test::Builder; use Test::More::Prefix qw/test_prefix/; -plan skip_all => 'TB0 tests' unless $Test::Builder::VERSION < 1; +plan skip_all => 'TB0 tests' unless $Test::Builder::VERSION < 1.005; # Get the Test Builder singleton my $tb = Test::Builder->new; diff -Naur Test-More-Prefix-0.003.orig/t/020_test_builder_2.t Test-More-Prefix-0.003/t/020_test_builder_2.t --- Test-More-Prefix-0.003.orig/t/020_test_builder_2.t 2013-11-14 15:52:16.000000000 +0000 +++ Test-More-Prefix-0.003/t/020_test_builder_2.t 2013-11-14 15:53:26.000000000 +0000 @@ -6,7 +6,7 @@ use Test::More; use Test::More::Prefix qw/test_prefix/; -plan skip_all => 'TB2 tests' unless $Test::Builder::VERSION > 1; +plan skip_all => 'TB2 tests' unless $Test::Builder::VERSION >= 1.005; my $log = TB2::Event::Log->new( level => 'notice', message => 'foo'); is($log->message, 'foo', "Pre-prefix unchanged");
On 2013-11-14 15:56:52, CHISEL wrote: Show quoted text
> I think this patch will resolve the issue
It resolves the issue for the stable 1.00x branch, but breaks again with the upcoming 1.3xx. The proper fix is now to completely remove the version checking and TB2 stuff, as that branch of Test-More is abandoned, and 1.3xx intended to be fully backwards-compatible.
On 2014-12-08 18:34:31, ilmari wrote: Show quoted text
> 1.3xx [is] intended to be fully backwards-compatible.
For public interfaces, that is. Test::More::Prefix wraps the private _print_comment method, which no longer exist, so it needs some other approach.
Resolved in 0.0004