[Catalyst] Catalyst::Action::REST

John Napiorkowski jjn1056 at yahoo.com
Mon Nov 20 14:58:30 GMT 2006


--- "Christopher H. Laco" <claco at chrislaco.com> wrote:

> Adam Jacob wrote:
> > After much discussion, I've unleased
> Catalyst::Action::REST upon an
> > unsuspecting CPAN.  It's an attempt at making
> RESTful web applications
> > in Catalyst easier (they were already pretty
> easy.) The basics:
> > 
> > 1) Uses an Action class to extend Catalyst's
> dispatch mechanism to allow
> > for different methods based on the HTTP Method. 
> For example:
> > 
> > sub foo :Local :ActionClass('REST') {}
> > 
> > sub foo_GET {}
> > 
> > sub foo_POST {}
> > 
> > sub foo_DELETE {}
> 
> Eek. Is this related to this in any way?
> http://marcusramberg.livejournal.com/37104.html
> 
> 
> Hopefully this module will change when that becomes
> reality.

I actually wrote something that supported this syntax
a few months ago pushed it to the mailing list for
comments but it didn't seem that anyone was
interested. Maybe we'll prefer this syntax instead? 
Anyway, attached is what I wrote, it let's you match
on multiple method types like:

sub catchall :   Local
                 ActionClass('Rest')
                 Method('PUT')
                 Method('POST')
{}

I had intended to do more with this, like to enable
some sort of automatic in/deflation of xml objects
based on the incoming message body, but got
sidetracked on some paying projects.

Maybe we could combine efforts?

--john

> 
> -=Chris
> 
> > _______________________________________________
> 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/
> 


 
____________________________________________________________________________________
The all-new Yahoo! Mail beta
Fire up a more powerful email and get things done faster. 
http://new.mail.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rest.pm
Type: application/octet-stream
Size: 2043 bytes
Desc: 3911937034-Rest.pm
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061120/74e6930d/Rest-0001.obj


More information about the Catalyst mailing list