[Catalyst] path actions
Jonathan Rockway
jon at jrock.us
Wed Aug 2 11:36:42 CEST 2006
Ben Hopkins wrote:
> When I ran the server, it listed authors/list in the "Loaded Private
> actions" section, but nothing in the "Loaded Path actions" part.
> When I go to localhost:3000/authors/list, I get the generic Catalyst
> page (after logging in).
>
> How can this be?
It could be :) that you didn't tell Catalyst that the method should be
publicly accessible. It should look like:
sub list : Local {
my ($self, $c, @args) = @_;
# whatever...
$c->response->body('list is working now');
}
The "Local" means to bind the method to the URL
/controllername/subname, assuming the controller is in
MyApp::Controller::ControllerName and the method is "subname".
Instead of :Local, you could also be using LocalRegex, Global, etc.,
as per the manual.
Hope this helps.
Regards,
Jonathan Rockway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 370 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060802/6e94f2b4/attachment.pgp
More information about the Catalyst
mailing list