On Wednesday 06 May 2009 09:01:43 am Dennis Daupert wrote:
> On Tue, May 5, 2009 at 7:24 PM, Tomas Doran <bobtf...@bobtfish.net> wrote:
> > my $output = delete $c->res->{body};
> > opem(FH, ">file") or die;
> > print FH $output;
> > close(FH);
> >
> > will do what you want...

> There are some things that aren't so obvious to me. Where would I place the
> code represented in your snippet?  I can't just hang it out in the main
> body of package hde::View::TTprint, 

In that example you don't *have* a View::TTprint. Or if you do, it's just 
another subclas of C::V::TT with a different config and search path. No 
overloading, no OUTPUT. You forward to the view, it writes into $c->res->body 
like it always does. You take the data out of $c->res->body and write it to a 
file, then null out $c->res->body so that RenderView will fill it in later 
using your default_view.

Andrew


_______________________________________________
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/

Reply via email to