[Catalyst] New built in action!

Pedro Melo melo at simplicidade.org
Sat Oct 22 15:39:03 CEST 2005


YES!

I was just toying with several ways of catching the index page but give 
404's to other stuff.

This will save me some time :)

Thanks,

On Oct 22, 2005, at 12:42 PM, Sebastian Riedel wrote:

> We (mostly Matt) just finished the new dispatcher, so we were able to 
> implement a new feature many of you requested.
>
> The "index" action! :)
>
> This action is much like "default" but doesn't take arguments and is 
> weighted a bit higher.
> So the new order is "normal action", "index", "default".
>
> Available in trunk as usual, and part of the upcoming 5.5 release.
>
>     http://dev.catalyst.perl.org/repos/Catalyst/trunk
>
> Here are some examples:
>
> #
> # "/"         - index will match
> # "/yada"     - default will match
> # "/bar"      - bar will match
> # "/foo"      - index in controller will match
> # "/foo/yada" - default in controller will match
> # "/foo/baz"  - baz in controller will match
> #
> package MyApp;
> sub index : Private {}
> sub default : Private {}
> sub bar : Global {}
>
> package MyApp::C::Foo;
> sub index : Private {}
> sub default : Private {}
> sub baz : Local {}
>
> --
> sebastian
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
--
Pedro Melo
JID: melo at simplicidade.org, open to all (unless you use Google Talk)
  ** Federation: just say no **




More information about the Catalyst mailing list