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. _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/