Skip Menu |

This queue is for tickets about the Config-General CPAN distribution.

Report information
The Basics
Id: 115326
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: Nobody in particular
Requestors: perlboy [...] cpan.org
Cc:
AdminCc:

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



Subject: Callback on 'pre_open' not called when glob expands to one include file
Hi Thomas, As said in the subject, when the include glob pattern expands to one include file the 'pre_open' callback is not called. The fix is either: Solution 1) 447c447,449 < $configfile = $include[0]; --- Show quoted text
> $configfile = shift(@include); > ($cont) = $this->_hook('pre_open', $configfile); > return if(!$cont);
or a matter of preference Solution 2) 446,447c446,450 < if (@include == 1) { < $configfile = $include[0]; --- Show quoted text
> # Multiple results, one 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($_);
449,457c452 < else { < # 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($_); < } < return; < } --- Show quoted text
> return;
Regards, Niels
applied, included in 1.62. Thanks a lot! - Tom