On Tue, Feb 24, 2009 at 11:56 AM, Clayton Scott <[email protected]> wrote:
>
> I want want both '/login' and '/login/*' to go to the same App but I
> can't see how to do it
> short of overriding _parse_path in a sub-class.
I ended up sub classing CA::Dispatch::Regexp and overriding _parse_path so I
could do:
My::Dispatcher->dispatch(
prefix => 'My::App::Dashboard',
table => [
qr|/| => { app => 'Home' },
qr|/login| => { app => 'Login::Ajax' },
],
);
Clayton
>
> In my table I've tried using the key 'login', 'login*', 'login/*' but
> one will always fail to match
> one or the other.
>
> Please tell me there's another way to do it!
>
> index.cgi
> #!/usr/bin/perl
> CGI::Application::Dispatch->dispatch(
> prefix => 'My::App::Dashboard',
> table => [
> '' => { app => 'Home' },
> 'login*' => { app => 'Login::Ajax' },
> #matches 'login/' but not 'login'
> ],
> debug => 1,
> );
>
>
>
>
>
> Thanks,
> Clayton
--
Clayton Scott
[email protected]
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################