[Catalyst] Setting file handle as the response body generates warnings.

John Napiorkowski jjn1056 at yahoo.com
Sun Dec 1 01:35:28 GMT 2013






On Wednesday, November 27, 2013 8:03 AM, neil.lunn <neil at mylunn.id.au> wrote:

On 27/11/2013 4:28 AM, John Napiorkowski wrote:

Awesome, send me a pull request :)
>
>
>https://github.com/perl-catalyst/catalyst-runtime
>
John.
The pull is there along with another doc patch I noticed when
    playing around with downstream PSGI invocations. I think the change
    is sane as it worked for me in a trivial test.

What I mentioned regarding subclassing ( or rather what I tested was
    more of a Moose delegation ) for such a class as
    IO::Compress::Gunzip and applying an overload seems rather trivial,
    though perhaps something people may come accross. Perhaps a doc
    patch to Catalyst::Manual or an Advent entry just for documentation
    sake. 

Also passing $c->res->body is something I have used on a few
    occasions as something providing a "write" for streaming responses
    (and possibly non blocking). So keen to share any thoughts re doing
    this non-blocking for "read" on a future release. 

There's a few approaches, you can also access the $response->write_fh which returns the psgi $writer (see the PSGI docs for delayed and streaming responses. 


Should we really be documenting some of the newer catalyst features
    in Cookbook? Or at least putting recipes in Advent . Event loop
    things, response from PSGI and how about Pocket::IO seem relevant.

Advent will have a bunch of articles related to new features, and some stuff around web sockets. nonblocking.

If someone wants to port any of the web sockets examples to pocket.io or similar, for running on older browsers, that would be great.  If you know about pocket.io feel free to take a look over at the catalyst a-synch example repository on github : https://github.com/jjn1056/Perl-Catalyst-AsyncExample

Thanks!

john



________________________________

   This email is free from viruses and malware because avast! Antivirus protection is active.  



More information about the Catalyst mailing list