Skip Menu |

This queue is for tickets about the Template-DBI CPAN distribution.

Report information
The Basics
Id: 124080
Status: new
Priority: 0/
Queue: Template-DBI

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: [PATCH] Tests fail without '.' in @INC
Patch will be attached in next message.

Failure on Perl 5.26 when installed with PERL_USE_UNSAFE_INC=0 explicitly set in environment ( simulating future Perl installation behaviour )


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/dbi.t .. do "t/lib.pl" failed, '.' is no longer in @INC; did you mean do "./t/lib.pl"? at t/dbi.t line 19.
Undefined subroutine &main::connect_database called at t/dbi.t line 27.
t/dbi.t .. skipped: not applicable on this platform

Test Summary Report
-------------------
t/dbi.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2


-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Subject: 0001-Fix-test-failures-on-Perl-5.26-w-PERL_USE_UNSAFE_INC.patch
From e55f99e77f12ac5ece679e159e577ef91eee0ba4 Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentnl@gentoo.org> Date: Mon, 15 Jan 2018 16:05:06 +1300 Subject: Fix test failures on Perl 5.26+ w/ PERL_USE_UNSAFE_INC=0 In future perls, CPAN.pm and Test::Harness will no longer be able to migitigate this failure mode by internally doing: $ENV{PERL_USE_UNSAFE_INC}=1 unless exists $ENV{PERL_USE_UNSAFE_INC} This fixes this problem by avoiding the need for @INC traversal by using a literal path ( eg: one with a / or a ./ prefix ), not an "@INC-relative path" ( eg: Foo/Baz.pm ), and breaking the reliance on "." in @INC Additionally, this replaces "do" with "require" to give automatic error handling, instead of continuing when the library load fails. Bug: https://bugs.gentoo.org/623120 Bug: https://rt.cpan.org/Ticket/Display.html?id=124080 --- t/dbi.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/dbi.t b/t/dbi.t index 7193210..7b6dccf 100644 --- a/t/dbi.t +++ b/t/dbi.t @@ -16,7 +16,7 @@ use strict; use warnings; -do "t/lib.pl"; +require "./t/lib.pl"; use Template::Test; use Template::Stash; -- 2.15.1