[Catalyst] Problem with RenderView
Bernhard Graf
catalyst2 at augensalat.de
Fri May 4 16:04:30 GMT 2007
On Friday 04 May 2007 16:41, Wade.Stuart at fallon.com wrote:
> why write()? I thought Cat does this behind the scenes if you pass
> $c->res->body($fh); #filehandle
There is no filehandle I could easily pass to $c->res->body(), because
data comes from a DBIC ResultSet object.
Of course I could store the whole output from the database into an
IO::String or similar and pass this object to $c->res->body(), but this
buys me exactly nothing in terms of memory usage and time.
I thought of doing it with fork() and IO::Pipe (let the child read from
DBIC ResultSet and pipe() to parent), but I'm unsure about the "costs"
and side-effects when forking from a web-server process.
--
Bernhard Graf
More information about the Catalyst
mailing list