Skip Menu |

This queue is for tickets about the Devel-SmallProf CPAN distribution.

Report information
The Basics
Id: 121134
Status: new
Priority: 0/
Queue: Devel-SmallProf

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

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



Subject: Tests will fail without '.' in @INC on >perl 5.25.11 ( do "t/part1.b" failed, '.' is no longer in @INC )

After carrying the patch in bug #98192 , other bugs become apparent on 5.25.11+ when "." is missing from @INC ( the default behaviour when building things by hand, or when PERL_USE_UNSAFE_INC is explicitly set to 0 )

Checking if your kit is complete...                    
Looks good
Generating a Unix-style Makefile             
Writing Makefile for Devel::SmallProf
Writing MYMETA.yml and MYMETA.json
>>> Source configured.                                               
>>> Compiling source in /var/tmp/portage/dev-perl/Devel-SmallProf-2.20.0-r2/work/Devel-SmallProf-2.02 ...
 * emake OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed
make -j3 'OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed'                                                                                      
cp lib/Devel/SmallProf.pm blib/lib/Devel/SmallProf.pm
>>> Source compiled.                     
>>> Test phase: dev-perl/Devel-SmallProf-2.20.0-r2
make -j3 test TEST_VERBOSE=0
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/part1.t .. do "t/part1.b" failed, '.' is no longer in @INC at t/part1.t line 9.
No such file or directory at t/part1.t line 9.
t/part1.t .. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run               
t/part2.t .. Failed 7/10 subtests                                         
t/part3.t .. do ".smallprof" failed, '.' is no longer in @INC at /var/tmp/portage/dev-perl/Devel-SmallProf-2.20.0-r2/work/Devel-SmallProf-2.02/blib/lib/Devel/SmallProf.pm line 59.
do "t/part3.b" failed, '.' is no longer in @INC at t/part3.t line 3.
No such file or directory at t/part3.t line 3.                                                                                    
t/part3.t .. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run                 
t/part4.t .. Failed 1/2 subtests         
t/pods.t ... skipped: Only the author needs to check that POD docs are right
                                          
Test Summary Report                     
-------------------
t/part1.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2                                                
  Parse errors: No plan found in TAP output                                                                       
t/part2.t (Wstat: 0 Tests: 10 Failed: 7)                                                                 
  Failed tests:  1-3, 5-8              
t/part3.t (Wstat: 512 Tests: 0 Failed: 0)                         
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/part4.t (Wstat: 0 Tests: 2 Failed: 1)
  Failed test:  1  


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

Subject: 0001-Fix-Perl-5.26-support-without-.-in-INC.patch
From 70d450555b1792530c4230cecf84a044b2c3f9ce Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentnl@gentoo.org> Date: Sun, 8 Oct 2017 11:45:25 +1300 Subject: Fix Perl 5.26 support without '.' in @INC 1. Tests rely on "do $LOCALFILE" syntax 2. Runtime conditionally can load a local file ('./.smallprof') Bug: https://bugs.gentoo.org/615590 Bug: https://rt.cpan.org/Ticket/Display.html?id=121134 --- lib/Devel/SmallProf.pm | 4 ++-- t/part1.t | 2 +- t/part2.t | 2 +- t/part3.t | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Devel/SmallProf.pm b/lib/Devel/SmallProf.pm index 2b5d091..4fdd66a 100644 --- a/lib/Devel/SmallProf.pm +++ b/lib/Devel/SmallProf.pm @@ -55,8 +55,8 @@ BEGIN { $drop_zeros = 0; $profile = 1; $grep_format = 0; - if (-e '.smallprof') { - do '.smallprof'; + if (-e './.smallprof') { + do './.smallprof'; } my $env=$ENV{SMALLPROF_CONFIG}||''; $drop_zeros = 1 if $env=~/z/; diff --git a/t/part1.t b/t/part1.t index 805ebe4..483f203 100644 --- a/t/part1.t +++ b/t/part1.t @@ -6,4 +6,4 @@ # doesn't have it's contents put into the symbol table. Thus this shim which # invokes the real part1 so that its contents are visible. -do 't/part1.b' or die "$!"; +do './t/part1.b' or die "$!"; diff --git a/t/part2.t b/t/part2.t index c808010..335d032 100644 --- a/t/part2.t +++ b/t/part2.t @@ -9,7 +9,7 @@ unless (open(OUT,'smallprof.out')) { undef $/; $_ = <OUT>; close OUT; -print +(/Profile of \(eval/ && m!Profile of t.part1\.b!) +print +(/Profile of \(eval/ && m!Profile of \./t.part1\.b!) ? "ok 1\n" : "not ok 1\n"; my (@matches) = /Profile of/g; print +(@matches == 3) ? "ok 2\n" : "not ok 2\n"; diff --git a/t/part3.t b/t/part3.t index 652b306..135d4ca 100644 --- a/t/part3.t +++ b/t/part3.t @@ -1,3 +1,3 @@ #!perl -d:SmallProf -do 't/part3.b' or die "$!"; +do './t/part3.b' or die "$!"; -- 2.14.1