Skip Menu |

This queue is for tickets about the Module-Load-Conditional CPAN distribution.

Report information
The Basics
Id: 48062
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Module-Load-Conditional

People
Owner: BINGOS [...] cpan.org
Requestors: nick.williams [...] morganstanley.com
Cc:
AdminCc:

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



Subject: fails to work with coderefs in @INC
Date: Tue, 21 Jul 2009 18:08:36 +0100
To: bug-Module-Load-Conditional [...] rt.cpan.org
From: Nick Williams <Nick.Williams [...] morganstanley.com>
Conditional has code to look for support coderefs within @INC, however it doesn't work. The code in Conditional.pm looks like: } elsif (UNIVERSAL::can($dir, 'INC')) { ($fh) = $dir->INC->($dir, $file); } This looks like some strange hybrid between a function call and a method call. Oddly, the INC method gets invoked, but with only one argument ($self, from the $dir in $dir->INC) and the supplied arg list ($dir, $file) is dropped. It works if you use the more intuitive syntax: } elsif (UNIVERSAL::can($dir, 'INC')) { ($fh) = $dir->INC ($file); } Cheers, Nick.
Hi, Nick, Thanks for the patch, I applied it as of version 0.31_01. Cheers.