[Catalyst] Dispatch problem: built-in vs. Apache13

Jesse Sheidlower jester at panix.com
Mon Aug 7 22:39:32 CEST 2006


I'm having a weird problem with one (and only one) of my Cat
apps; it works under the built-in server, but something is
happening under Apache13 that messes up how it's handling the
dispatching, namespace-wise. Specifically, under Apache, all
of the actions get mapped to /, instead of to the right thing
(in this case my "do_search" method should be at
/search/do_search, but instead it's showing up at /do_search,
which doesn't match, hence the Root default action is called).
This is under 5.7001.

Here's the startup-action list under the built-in server (ending
trimmed for space):

[debug] Loaded Path actions:
.-------------------------------------+-------------------------
| Path                                | Private                 
+-------------------------------------+-------------------------
| /                                   | /default                
| /list_part                          | /search/list_part       
| /list_source                        | /search/list_source     
| /login                              | /user/login             
| /logout                             | /user/logout            
| /search                             | /search/default         
| /search/do_search                   | /search/do_search       
| /view                               | /search/view            
'-------------------------------------+-------------------------

and here's the list under Apache:

[debug] Loaded Path actions:
.-------------------------------------+-------------------------
| Path                                | Private                 
+-------------------------------------+-------------------------
| /                                   | /default                
| /                                   | /default                
| /do_search                          | /do_search              
| /list_part                          | /list_part              
| /list_source                        | /list_source            
| /login                              | /login                  
| /logout                             | /logout                 
| /view                               | /view                   
'-------------------------------------+-------------------------

Note that both "default"s are mapped to /, while one should be at
/ and one at /search, and that /search/do_search is at /do_search.

My Apache config for this app is:

<Perl>
  use lib qw( /usr/local/www/modules/Incomings/lib  );
</Perl>
PerlModule Incomings
<Location /incomings>
        SetHandler perl-script
        PerlHandler Incomings
</Location>

(where the given path contains the usual directory created
by running catalyst.pl)

In my Root.pm I do have

__PACKAGE__->config->{namespace} = ''; 

I'm sort of at a loss. Someone suggested that the problem could
be an old version of one of the Cat modules, but that doesn't
seem to be the case; though my INCs differ from the commandline
and mod_perl, they both have the same version of Cat modules,
and I have the same problem on two different systems. Both are
FreeBSD, by the way.

Any ideas? I'd rather like to be able to run this under Apache
for production work....

Thanks.

Jesse Sheidlower



More information about the Catalyst mailing list