You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-perl/DBI-Shell/files/DBI-Shell-11.950.0-perl526....

40 lines
1.3 KiB

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