[Catalyst] New built in action!
Sebastian Riedel
sri at oook.de
Sat Oct 22 13:42:12 CEST 2005
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
More information about the Catalyst
mailing list