[Catalyst] Bug in Catalyst.pm

Chad Davis chad.a.davis at gmail.com
Thu May 5 13:46:49 GMT 2011


On Thu, May 5, 2011 at 10:40, Neo van Goth <neo at gothic-chat.de> wrote:
> 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
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>


This seems to be the responsibility of Module::Pluggable::Object in
the find_files() function, which does not use the Mac-specific
features of File::Find (which seems to have a dependency on
Mac::Files), nor does it generally filter out hidden directories
(which would be a welcome feature). Maybe it would be better to file a
bug/feature request against M::P::O

Mac notes for F::F
http://search.cpan.org/~rjbs/perl-5.12.3/lib/File/Find.pm#NOTES

Chad



More information about the Catalyst mailing list