[Catalyst] path actions

Ben Hopkins hopkins.ben at gmail.com
Wed Aug 2 19:19:58 CEST 2006


Thanks.  I had all the things you suggested, except for on little thing.
Now I know that 'local' should be 'Local'.  So many things in Catalyst are
case-agnostic, but this is the perl part, still case sensetive.

On 8/2/06, Jonathan Rockway <jon at jrock.us> wrote:
>
>
> 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
>
>
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060802/0d82189c/attachment.htm 


More information about the Catalyst mailing list