<DIV>I would very much appreciate feedback on my approach to using my TT view with REST.&nbsp; I'm just playing with the AdventREST example trying to understand the whole REST thing.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I created a class (lib/AdventREST/MyREST.pm) for my controllers to inherit from.&nbsp;&nbsp;This class inherits from Catalyst::Controller::REST.</DIV>  <DIV>&nbsp;</DIV>  <DIV>In MyREST.pm, I override the 'end' method to either use the RenderView ActionClass or the Serialize ActionClass:</DIV>  <DIV>&nbsp;</DIV>  <DIV>sub _renderview : ActionClass('RenderView') {}</DIV>  <DIV>sub _serialize : ActionClass('Serialize') {}</DIV>  <DIV>&nbsp;</DIV>  <DIV>sub end : Private {<BR>&nbsp;my ($self, $c) = @_;</DIV>  <DIV><BR>&nbsp;if ( $self-&gt;want_renderview($c) ) {<BR>&nbsp;&nbsp;$c-&gt;forward('_renderview');<BR>&nbsp;}<BR>&nbsp;else {<BR>&nbsp;&nbsp;$c-&gt;forward('_serialize');</DIV>  <DIV>}<BR></DIV>  <DIV>where the want_renderview() method can be written however
 you want to (using the Content-Type or file extension or whatever).<BR></DIV>  <DIV>Thanks.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Greg</DIV>  <DIV><BR>Message: 4<BR>Date: Mon, 29 Jan 2007 21:36:03 -0800<BR>From: Adam Jacob <ADAM@STALECOFFEE.ORG><BR>Subject: Re: [Catalyst] Tweaking REST<BR>To: claco@chrislaco.com, The elegant MVC web framework<BR><CATALYST@LISTS.RAWMODE.ORG><BR>Message-ID: &lt;94E045AB-5CF1-470F-B28C-C3A8A5618718@stalecoffee.org&gt;<BR>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<BR><BR>On Jan 29, 2007, at 12:19 PM, Christopher H. Laco wrote:</DIV>  <DIV>...<BR>&gt;&gt; As it stands now, REST JustWorks with xml/json stuff. text/html is<BR>&gt;&gt; mapped to YAML::HTML, but I want to map that to my standard TT <BR>&gt;&gt; view.<BR></DIV>