Subject: | ConfigPath option not acknowledged with IncludeGlob |
Hi,
if files are included by means of a glob pattern having the -IncludeGlob
option activated, paths specified by the -ConfigPath option are being
neglected when trying to spot the files.
A possible cure is being delivered as a patch file as an attachment to
this bug report.
Cheers,
Alex
Subject: | patch.txt |
--- old/Config/General.pm 2008-11-18 16:32:37.000000000 +0100
+++ new/Config/General.pm 2008-11-18 16:29:39.000000000 +0100
@@ -413,6 +413,14 @@
# Something like: *.conf (or maybe dir/*.conf) was included; expand it and
# pass each expansion through this method again.
my @include = grep { -f $_ } bsd_glob($configfile, GLOB_BRACE | GLOB_QUOTE);
+
+ if ( !@include && defined $this->{ConfigPath} ) {
+ foreach my $dir (@{$this->{ConfigPath}}) {
+ push @include, grep { -f $_ } bsd_glob(catfile($dir, $basefile), GLOB_BRACE | GLOB_QUOTE);
+ last if @include;
+ }
+ }
+
if (@include == 1) {
$configfile = $include[0];
}