So, I'm working on my Catalyst app and editing one of my controllers. I restart apache (app runs under mod_perl) and get a useless error message
Warning: Use of "require" without parentheses is ambiguous at (eval 357) line 1. syntax error at (eval 357) line 2, at EOF Compilation failed in require at /Users/chris/perl/lib/perl5/site_perl/Catalyst/Test.pm line 79.
use Carp; $SIG{__DIE__} = \&Carp::confess;
Since Foo::.#Home.pm is not a valid module name, I don't think Module::Pluggable should be loading it. It's not a difficult thing to check. I'd file the bug report.
Re:I call it a bug
Alias on 2007-02-15T03:06:13
I concur.
I'd expect Module::Pluggable to skip at the very least hidden files) but checking that the file name matches a legitimate module naming pattern works as well.
Re:I call it a bug
Dom2 on 2007-02-15T12:18:01
In fact, it works better, as it's a whitelist rather than a blacklist. So it won't have to be updated in the future. For example, I'd bet that you also want to ignore @._*@ (OS X droppings).Re:I call it a bug
muttley on 2007-02-15T21:03:06
Hmm, I thought I was skipping non valid files.
I'll have a check and see what's going on.Re:I call it a bug
ChrisDolan on 2007-02-15T21:37:03
I think this line is at fault:It should probably be something like:next unless $plugin =~ m!(?:[a-z\d]+)[a-z\d]!i;Does Perl allow Unicode in module names? I though not, but if so [a-z] is too restrictivenext unless $plugin =~ m!\A [a-z]\w* (?:::[a-z]\w* )* \z!ix;