Hi Larry,

On 15-Nov-10, at 10:55 AM, Larry Leszczynski wrote:

Hi Dorian -

OK, but the part that confuses me is why /foo doesn't resolve to
MyApp::Foo::index with ->go or ->visit.

Maybe this will help (I think in this case "index" works like
"default"):

  http://wiki.catalystframework.org/wiki/wikicookbook/safedispatchusingpath


According to your wiki page, my solution is thus:

package MyApp;

sub _date :Regex('^(\d{4}-\d{2}-\d{2})(.*)$') {
    my ($self, $c) = @_;
    my ($date, $rest) = @{$c->req->captures};
    $c->req->path($rest);
    $c->dispatcher->prepare_action($c);
    $c->go($c->action, $c->req->args);
}

This exhibits exactly the behaviour I was looking for.

Thanks,

--
Dorian Taylor
Make things. Make sense.
http://doriantaylor.com


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to