[Catalyst] Re: How to send raw HTTP response
Dagfinn Ilmari Mannsåker
ilmari at ilmari.org
Sun Sep 28 17:39:33 BST 2008
Tomas Doran <bobtfish at bobtfish.net> writes:
> On 27 Sep 2008, at 19:48, Matt S Trout wrote:
>> Just call $c->write($chunk) with each chunk of data as you get it.
>>
>> Catalyst will automatically send headers before the first chunk for
>> you.
>>
>> Do -not- rely on STDOUT being an appropriate filehandle to print to,
>> that's
>> an accident of the engine design and could easily go away.
>
> Unfortunately, if you're using Archive::Zip, you don't get an option to
> get chunks you can call $c->write with, you _need_ to write to a file
> handle.. (And this isn't the only module on CPAN that'd behave like
> this).
(…)
> Thoughts / pointing out the module I missed on CPAN?
Catalyst::Response in 5.80 trunk implements ->print, just for this
puropse (I needed it for Text::CSV_XS' ->print($fh, $fields) method).
--
ilmari
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen
More information about the Catalyst
mailing list