FAQ

On Tue, Mar 31, 2009 at 09:03:15PM -0700, Bruce McKenzie wrote:
Is there a way to declare some paths as NOT subject to deserialization? The
reason I ask is that I want it for most everything...just not for a few paths.
Instead of deserializing in begin() (as C::C::REST does for you), this might
work:

sub deserialize : Chained(/) PathPart('') ActionClass(Deserialize) {}

sub foo : Chained(deserialize) ActionClass(REST) {}
sub foo_POST {...} # etc.

sub bar : ActionClass(REST) {}
sub bar_PUT {...} # etc.

foo comes from the deserialize action, bar doesn't, so a PUT to /bar won't
trigger deserialization. (note: totally untested.)

In the future, when we all have flying cars, REST and Deserialize will be
action roles, and you can do:

sub foo : Does(REST) Does(Deserialize) {}
sub foo_POST {...}

sub bar : Does(REST) {}
sub bar_PUT {...}

I'm open to other suggestions.

hdp.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedApr 1, '09 at 5:03a
activeApr 1, '09 at 6:54a
posts2
users2
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase