Skip Menu |

This queue is for tickets about the PadWalker CPAN distribution.

Report information
The Basics
Id: 120421
Status: resolved
Priority: 0/
Queue: PadWalker

People
Owner: robin [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

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



Subject: Fails tests when no '.' in @INC

On 5.25.10 with -Ddefault_inc_excludes_dot

 

PERL_DL_NONLAZY=1 "/home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/bin/perl5.25.10" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Can't locate bar.pl in @INC (@INC contains: /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/foo.t line 8.
t/foo.t .......
Dubious, test returned 2 (wstat 512, 0x200)
Failed 6/6 subtests
t/our.t ....... ok
t/recurse.t ... ok
t/dm.t ........ ok
t/sub.t ....... ok
Can't locate vn-inc-1.pl in @INC (@INC contains: /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/var_name.t line 35.
t/var_name.t ..
Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/8 subtests
t/tt.t ........ ok
t/test.t ...... ok
t/closure.t ... ok

Test Summary Report
-------------------
t/foo.t     (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 6 tests but ran 0.
t/var_name.t (Wstat: 512 Tests: 4 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 8 tests but ran 4.
Files=9, Tests=72,  0 wallclock secs ( 0.04 usr  0.02 sys +  0.09 cusr  0.04 csys =  0.19 CPU)
Result: FAIL



-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

On Mon Feb 27 04:54:00 2017, KENTNL wrote: Show quoted text
> On 5.25.10 with -Ddefault_inc_excludes_dot > > PERL_DL_NONLAZY=1 > "/home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/bin/perl5.25.10" > "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef > *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" > t/*.t > Can't locate bar.pl in @INC (@INC contains: > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/site_perl/5.25.10/x86_64-linux > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/site_perl/5.25.10 > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/5.25.10/x86_64-linux > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/5.25.10) at > t/foo.t line 8. > t/foo.t ....... > Dubious, test returned 2 (wstat 512, 0x200) > Failed 6/6 subtests > t/our.t ....... ok > t/recurse.t ... ok > t/dm.t ........ ok > t/sub.t ....... ok > Can't locate vn-inc-1.pl in @INC (@INC contains: > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/lib > /home/kent/.cpanm/work/1488188429.18643/PadWalker-2.2/blib/arch > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/site_perl/5.25.10/x86_64-linux > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/site_perl/5.25.10 > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/5.25.10/x86_64-linux > /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc- > nodot/lib/5.25.10) at > t/var_name.t line 35. > t/var_name.t .. > Dubious, test returned 2 (wstat 512, 0x200) > Failed 4/8 subtests > t/tt.t ........ ok > t/test.t ...... ok > t/closure.t ... ok > > Test Summary Report > ------------------- > t/foo.t (Wstat: 512 Tests: 0 Failed: 0) > Non-zero exit status: 2 > Parse errors: Bad plan. You planned 6 tests but ran 0. > t/var_name.t (Wstat: 512 Tests: 4 Failed: 0) > Non-zero exit status: 2 > Parse errors: Bad plan. You planned 8 tests but ran 4. > Files=9, Tests=72, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.09 cusr > 0.04 csys = > 0.19 CPU) > Result: FAIL > > > > -- > - CPAN kentnl@cpan.org > - Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
The same test failures are present in perl-5.27.2.
On Fri Aug 04 00:00:19 2017, JKEENAN wrote: Show quoted text
> > The same test failures are present in perl-5.27.2.
Please review patch attached. Thank you very much. Jim Keenan
Subject: 0001-Accommodate-absence-of-.-from-INC.patch
From b6a26ef2e4627e37eabb4db0e2b78f954f2dd5c1 Mon Sep 17 00:00:00 2001 From: James E Keenan <jkeenan@cpan.org> Date: Fri, 4 Aug 2017 06:14:06 -0400 Subject: [PATCH] Accommodate absence of '.' from @INC. Tell two test files where to find files for 'require' and 'do'. For: https://rt.cpan.org/Ticket/Display.html?id=120421 --- t/foo.t | 1 + t/var_name.t | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/t/foo.t b/t/foo.t index aa35895..460a386 100644 --- a/t/foo.t +++ b/t/foo.t @@ -1,6 +1,7 @@ use strict; use PadWalker; use Data::Dumper; +BEGIN { push @INC, '.'; } print "1..6\n"; diff --git a/t/var_name.t b/t/var_name.t index 2b7cf31..8a98467 100644 --- a/t/var_name.t +++ b/t/var_name.t @@ -3,6 +3,7 @@ use PadWalker 'var_name'; use strict; use warnings; no warnings 'misc'; +BEGIN { push @INC, '.'; } chdir "t"; @@ -32,4 +33,4 @@ my $closure; print (var_name($closure, $closure->()) eq '$aaa' ? "ok 4\n" : "not ok 4\n"); -require "vn-inc-1.pl"; \ No newline at end of file +require "vn-inc-1.pl"; -- 2.7.4
Subject: Re: [rt.cpan.org #120421] Fails tests when no '.' in @INC
Date: Sun, 6 Aug 2017 15:15:28 +1200
To: bug-PadWalker [...] rt.cpan.org
From: Kent Fredric <kentfredric [...] gmail.com>
On 4 Aug 2017 22:19, "James E Keenan via RT" <bug-PadWalker@rt.cpan.org> wrote: <URL: https://rt.cpan.org/Ticket/Display.html?id=120421 > On Fri Aug 04 00:00:19 2017, JKEENAN wrote: Show quoted text
> > The same test failures are present in perl-5.27.2.
Please review patch attached. Thank you very much. Jim Keenan If possible, find rewrites to things like the use of relative require ( see last line of patch ) instead of @inc modification. @Inc modification is mostly reserved for "this is too hard to fix any other way" and "i don't have time to do this properly" (Ol, Module::Install is an example of the first)
Alternative fix by prepending ./ before the file names.
Subject: pw_inc.patch
*** PadWalker-2.2/t/foo.t~ 2017-09-30 17:41:54.013573025 +0200 --- PadWalker-2.2/t/foo.t 2017-09-30 17:42:19.431368617 +0200 *************** *** 5,12 **** print "1..6\n"; chdir "t"; ! require "bar.pl"; ! do "baz.pl"; my $nono; --- 5,12 ---- print "1..6\n"; chdir "t"; ! require "./bar.pl"; ! do "./baz.pl"; my $nono; *** PadWalker-2.2/t/var_name.t~ 2005-10-13 14:58:05.000000000 +0200 --- PadWalker-2.2/t/var_name.t 2017-09-30 17:42:37.672939589 +0200 *************** *** 32,35 **** print (var_name($closure, $closure->()) eq '$aaa' ? "ok 4\n" : "not ok 4\n"); ! require "vn-inc-1.pl"; \ No newline at end of file --- 32,35 ---- print (var_name($closure, $closure->()) eq '$aaa' ? "ok 4\n" : "not ok 4\n"); ! require "./vn-inc-1.pl"; *** PadWalker-2.2/t/vn-inc-1.pl~ 2005-10-13 14:54:05.000000000 +0200 --- PadWalker-2.2/t/vn-inc-1.pl 2017-09-30 17:46:08.471537711 +0200 *************** *** 1 **** ! my %waaah; print (var_name(0, \%waaah) eq '%waaah' ? "ok 5\n" : "not ok 5\n"); do "vn-inc-2.pl"; \ No newline at end of file --- 1,5 ---- ! my %waaah; ! ! print (var_name(0, \%waaah) eq '%waaah' ? "ok 5\n" : "not ok 5\n"); ! ! do "./vn-inc-2.pl";
Please... What more do you need to get this fixed?
Subject: Re: [rt.cpan.org #120421] Fails tests when no '.' in @INC
Date: Fri, 10 Nov 2017 18:25:46 +0000
To: bug-PadWalker [...] rt.cpan.org
From: Robin Houston <robin.houston [...] gmail.com>
A reminder when I have time to deal with it, apparently! Really sorry for dropping the ball on this. I’m on it now. Cheers, Robin On Fri, 10 Nov 2017 at 17:18 Johan Vromans via RT <bug-PadWalker@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=120421 > > > Please... What more do you need to get this fixed? >
On Fri Nov 10 12:18:08 2017, JV wrote: Show quoted text
> Please... What more do you need to get this fixed?
This should be fixed in 2.3.