[Catalyst] Setting the Catalyst Request object

Christopher H. Laco claco at chrislaco.com
Thu Dec 13 15:09:39 GMT 2007


Bill Moseley wrote:
> Yesterday I needed to add JSON support (both in the request and
> response) to a few actions.  I decided to try Catalyst::Action::REST.
> =

> Well, actually, I first tried using just C::A::Serialize and
> C::A::Deserialize -- but was not sure if those could be used
> separately.  That didn't work so then I just tried using the full
> REST setup as described in the calendar.
> =

> Well, that brings in C::Request::REST, which set the request object,
> and I already have C::P::Server which does the same thing.
> =

> Is there a way that multiple add-ons can work better together when
> they need to add methods to the request object?
> =

> =


I would think you could beat them at their own game. Make your own
subclass, which inherits from both of their Request subclasses. Then,
just have Cat use yours instead.

-=3DChris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071213/25da=
a21d/signature.pgp


More information about the Catalyst mailing list