[Catalyst] RESTful perl implementations...

John Napiorkowski jjn1056 at yahoo.com
Tue Sep 26 20:03:14 CEST 2006


--- Matt S Trout <dbix-class at trout.me.uk> wrote:

> Garrett Goebel wrote:
> > On Sep 26, 2006, at 9:44 AM, Matt S Trout wrote:
> > 
> >> Garrett Goebel wrote:
> >>> I'm sure this is too late to be useful. But here
> is my subclassed
> >>> Catalyst::Action to implemented RESTful request
> method based
> >>> dispatching. [I've been working on this in my
> free time. Which I have
> >>> precious little of lately. My apologies.]
> >>>
> >>> The references to $c->request->path_parameters
> are to support RoR
> >>> style processing of urls (foo.com/person;create)
> where
> >>> Catalyst::Dispatcher->perpare_action is
> overridden to match url paths
> >>> separate from path parameters and file
> extensions.
> >>>
> >>> I also override
> Catalyst::Dispatcher->setup_actions to change the
> >>> default method_action_class to my subclass of
> Catalyst::Action. I was
> >>> surprised that default method_action_class and
> action_container_class
> >>> appear to be hard coded...
> >> These shouldn't need to be altered - the action
> class for  
> >> dispatchable actions
> >> can be applied via :ActionClass or for an entire
> controller via  
> >> classdata.
> > 
> > Perhaps it is a matter of taste, but I find
> appending :ActionClass to  
> > dispatchable actions to be clunky.
> > 
> > Time permitting, I'll pour through the
> documentation and code on how  
> > to do that with "an entire controller via
> classdata". Or if you can  
> > point me directly to the relevant documentation
> that would be greatly  
> > appreciated.
> 
> package MyApp::Controller::Foo;
> 
> use base qw/Catalyst::Controller/;
> 
> __PACKAGE__->_action_class('My::Action::Class');

That's very useful to know.  Can this take a array or
arrayref values?  From looking at Catalyst::Base I
gather not, but it would be cool if you could
aggregate action classes in some way.

--john

> 
> ...
> 
> -- 
>       Matt S Trout       Offering custom
> development, consultancy and support
>    Technical Director    contracts for Catalyst,
> DBIx::Class and BAST. Contact
> Shadowcat Systems Ltd.  mst (at)
> shadowcatsystems.co.uk for more information
> 
> + Help us build a better perl ORM:
> http://dbix-class.shadowcatsystems.co.uk/ +
> 
> _______________________________________________
> 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/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list