Skip Menu |
 

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

Report information
The Basics
Id: 121136
Status: resolved
Priority: 0/
Queue: DBI-Shell

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

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

Attachments
0001-Fix-.-removal-from-INC-in-Perl-5.26.patch



Subject: Tests fail when no '.' in @INC ( Can't locate dbish_config in @INC )
When no '.' is in @INC on Perl 5.25.11 or newer ( the default when installing by hand, or when PERL_USE_UNSAFE_INC=0 is set in ENV )
Tests fail as follows:


t/csv.t ....... 1/13 DBI::Shell 11.95 using DBI 1.636 in batch mode                                                                                                                                                                                                                  
Can't locate dbish_config in @INC (@INC contains: /var/tmp/portage/dev-perl/DBI-Shell-11.950.0-r1/work/DBI-Shell-11.95/blib/lib /var/tmp/portage/dev-perl/DBI-Shell-11.950.0-r1/work/DBI-Shell-11.95/blib/arch /etc/perl /usr/local/lib64/perl5/5.25.11/x86_64-linux /usr/local/lib6$
/perl5/5.25.11 /usr/lib64/perl5/vendor_perl/5.25.11/x86_64-linux /usr/lib64/perl5/vendor_perl/5.25.11 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.25.11 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.25.11/x86_64-linux /usr/lib64/$
erl5/5.25.11) at /var/tmp/portage/dev-perl/DBI-Shell-11.950.0-r1/work/DBI-Shell-11.95/blib/lib/DBI/Shell.pm line 547.               
Show quoted text
# Looks like your test exited with 2 just after 3.                                                                            
t/csv.t ....... Dubious, test returned 2 (wstat 512, 0x200)                                                     
Failed 10/13 subtests                                                                       
t/func.t ...... skipped: Function tests not completed                                                                           
t/shell.t ..... Useless localization of scalar assignment at /var/tmp/portage/dev-perl/DBI-Shell-11.950.0-r1/work/DBI-Shell-11.95/blib/lib/DBI/Format.pm line 377.
t/shell.t ..... 1/51 DBI::Shell 11.95 using DBI 1.636 in batch mode
Connecting to 'dbi:ExampleP:' as ''...                             

http://cpan.simcop2387.info/logs/DBI::Shell_incfailure.log

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Subject: 0001-Fix-.-removal-from-INC-in-Perl-5.26.patch
From 792cf15cb387e58cec1ef3c6d538689d02ab44c3 Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentnl@gentoo.org> Date: Sun, 8 Oct 2017 12:46:17 +1300 Subject: Fix '.' removal from @INC in Perl 5.26 Configuration files were always assumed to be explicit paths given by outsiders, not random entries in @INC Bug: https://bugs.gentoo.org/615592 Bug: https://rt.cpan.org/Ticket/Display.html?id=121136 --- lib/DBI/Shell.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/DBI/Shell.pm b/lib/DBI/Shell.pm index 03dd958..7869f0f 100755 --- a/lib/DBI/Shell.pm +++ b/lib/DBI/Shell.pm @@ -133,6 +133,7 @@ use Text::Abbrev (); use Term::ReadLine; use Getopt::Long 2.17; # upgrade from CPAN if needed: http://www.perl.com/CPAN use IO::File; +use File::Spec (); use DBI 1.00 qw(:sql_types :utils); use DBI::Format; @@ -544,7 +545,8 @@ sub configuration { $sh->{config_file} = $ENV{DBISH_CONFIG} || "$homedir/.dbish_config"; my $config; if ($sh->{config_file} && -f $sh->{config_file}) { - $config = require $sh->{config_file}; + my $full = File::Spec->rel2abs( $sh->{config_file} ); + $config = require $full; # allow for custom configuration options. if (exists $config->{'options'} ) { $sh->install_options( $config->{'options'} ); -- 2.14.1
Thank you for your patch! I have merged it into 11.95_01.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.