[cgiapp] CGI::Application::Dispatch help

fREW Schmidt frioux at gmail.com
Tue Jan 13 15:59:09 EST 2009


Hi!

I am a little confused about how CAD is supposed to work I guess.


First off, I have a directory, call it abc.  And then inside of that I have
ACD, which is my namespace.  Inside of ACD I have Dispatch.pm.  Here is the
contents of that file:

package ACD::Dispatch;
use base 'CGI::Application::Dispatch';
use warnings;

sub dispatch_args {
    return {
        prefix  => 'ACD',
        debug => 1,
        table   => [
            '/'                => { app => 'Home', rm => 'welcome' },
            ':app/:rm'        => { },
        ],
    };
}

1;

I am using Apache 2.2 on windows with mod_perl.

I think this is all you might need to see from there:

<Directory  "c:/path/to/abc">
   SetHandler perl-script
   PerlHandler ACD::Dispatch
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


Ok, so here is what has been happening:

Go to:
localhost/abc/
Get:
Home, welcome

Go to:
localhost/abc/fdjksalfdsafdsa
Get:
Home, welcome

Go to:
localhost/abc/jkfldjskljfdkls/home_othercontroller
Get:
Error'd

Go to:
localhost/abc/jkfldjskljfdkls/home_othercontroller/some_rm
Get:
Home/OtherController, some_rm


So I guess my questions are: why is it ignoring that first directory?  And
do I actually have to put the startrunmode in the dispatcher?  It seems to
be ignoring the one set in OtherController.pm.

Thanks for any help at all!
-- 

-fREW


More information about the cgiapp mailing list