[Catalyst] Bug in Catalyst.pm

Neo van Goth neo at gothic-chat.de
Thu May 5 08:40:49 GMT 2011


Hi,

I haven't found the right way to file a bug report, so I'll just post it here - maybe someone knows the right way.

I have found a bug in Catalyst.pm, which prevents Catalyst to start under some circumstances.

If you use AFP (Apple Filing Protocol) to access files on a Linux box running netatalk (OSS AFP server), Mac OS X creates subfolders called '.AppleDouble'. These folders can contain so called 'resource forks' of files in the upper folder.
The problem is, that Catalyst searches all .pm's inside lib/ and constructs package names from paths. For example foo/bar.pm becomes foo::bar. If there is a .AppleDouble fork of bar.pm - foo/.AppleDouble/bar.pm - Catalyst tries to load foo::.AppleDouble::bar, which throws an error, as perl modules must not contain points in the name.

There is a maybe not elegant, but simple fix:

In Catalyst.pm there is a sub called setup_components().
In there, you'll find 'for my $component ( @comps ) {'.

Just add

'next if $component =~/\./;'

after the for-statement.


Greets,
Tom 'Neo van Goth' Weber


More information about the Catalyst mailing list