diff --git a/Changelog b/Changelog index 4e817a4..f9629ef 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,8 @@ +2.63 - fix for rt.cpan.org#116340: do only consider a backslash + as meta escape char, but not if it appears on it's own, + as it happens on windows platforms. Thanks to for finding + and tracking it down. + 2.62 - fix rt.cpan.org#115326: Callback on 'pre_open' not called when glob expands to one include file diff --git a/General.pm b/General.pm index 867af12..1169d7e 100644 --- a/General.pm +++ b/General.pm @@ -32,7 +32,7 @@ use Carp::Heavy; use Carp; use Exporter; -$Config::General::VERSION = "2.62"; +$Config::General::VERSION = "2.63"; use vars qw(@ISA @EXPORT_OK); use base qw(Exporter); @@ -454,9 +454,18 @@ sub _open { $configfile = $basefile; } - if ($this->{IncludeGlob} and $configfile =~ /[*?\[\{\\]/) { + my $glob = qr/[*?\[\{\\]/; + if ($^O =~ /win/i) { + # fix for rt.cpan.org#116340: do only consider a backslash + # as meta escape char, but not if it appears on it's own, + # as it happens on windows platforms. + $glob = qr/(\\[*?\[\{\\]|[*?\[\{])/; + } + + if ($this->{IncludeGlob} and $configfile =~ /$glob/) { # Something like: *.conf (or maybe dir/*.conf) was included; expand it and # pass each expansion through this method again. + local $_; my @include = grep { -f $_ } bsd_glob($configfile, GLOB_BRACE | GLOB_QUOTE); # applied patch by AlexK fixing rt.cpan.org#41030 @@ -473,8 +482,9 @@ sub _open { # Multiple results or no expansion results (which is fine, # include foo/* shouldn't fail if there isn't anything matching) # rt.cpan.org#79869: local $this->{IncludeGlob}; - for (@include) { - $this->_open($_); + foreach my $file (@include) { + print STDERR "CALLING __open($file)\n"; + $this->_open($file); } return; } @@ -2865,7 +2875,7 @@ Thomas Linden =head1 VERSION -2.62 +2.63 =cut diff --git a/README b/README index 796a195..f4e88ec 100644 --- a/README +++ b/README @@ -104,4 +104,4 @@ AUTHOR VERSION - 2.62 + 2.63