[Catalyst] Catalyst::Action::REST

Christopher H. Laco claco at chrislaco.com
Mon Nov 20 14:24:38 GMT 2006


Christopher H. Laco wrote:
> Matt S Trout wrote:
>> On 20 Nov 2006, at 13:47, Christopher H. Laco 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 all=
ow
>>>> 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.
>> No, I don't believe it will - or at least I hope it won't.
>>
>> The syntax marcus proposes is likely to be in core as a convenience for
>> lightweight HTTP method restricting as of 5.80.
>>
>> Catalyst::Action::REST is designed to be a full REST handler, and as
>> such needs the slightly more wordy syntax in order to fulfill its rather
>> more extensive function.
>>
>> --Matt S Trout, Technical Director, Shadowcat Systems Ltd.
>> Offering custom development, consultancy and support contracts for
>> Catalyst,
>> DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for detail=
s.
>> + Help us build a better perl ORM:
>> http://dbix-class.shadowcatsystems.co.uk/ +
>>
>>
>>
> =

> Can't the two get along? Having to do _GET seems silly if/when the core
> actually has a Method('POST') attribute...
> =

> -=3DChris

Sigh. ENOCOFFEEYET

_GET ...  Method('GET')

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061120/38a6=
22dd/signature.pgp


More information about the Catalyst mailing list