blob: cd8258480d70bd45396d3ad35e62a370da7220db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
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
|