[Catalyst] arguments to default methods
Perrin Harkins
perrin at elem.com
Wed Jun 22 12:29:15 CEST 2005
The default private method isn't working quite like I expected.
I have a class like this:
package Poli::C::PetitionEditor;
sub default : Private {
my ( $self, $c, $method ) = @_;
...
}
I expected $method would contain "list" for the
URL /petitioneditor/list, but it actually comes up empty.
It works if I change it to this:
sub petitioneditor : Global {
I was hoping to avoid the redundancy though. Is there a way to make the
default method get these arguments, or am I misunderstanding how it's
supposed to be used?
Incidentally, the Manual::Intro does say that this only works for "regex
actions keys with '^' and '$' anchors", but the CRUD docs show it
working with a global method, and it does seem to work fine with global
methods.
- Perrin
- Perrin
More information about the Catalyst
mailing list