Re: [Mason] Streaming with Mason 2

2012-10-04 Thread Alexander
Hi Jonathan, the patches to today's CPAN versions of Poet and Mason attached. Having those an .mp module should looks like: CLASS->no_wrap; method handle { sub { my $responder = shift; my $writer = $responder->([ 200, [ 'Content-Type', 'text/plain' ] ]); for (my

Re: [Mason] Streaming with Mason 2

2012-10-04 Thread Jonathan Swartz
Hi Alexander, I haven't had a chance to implement streaming in Poet/Mason2 yet, unfortunately. Patches are welcome. :) Jon On Oct 4, 2012, at 9:14 AM, Alexander wrote: > Dear colleagues, > > I have rather massive SQL query results to be fed as CSV to the client. What > I currently did is mou

[Mason] Streaming with Mason 2

2012-10-04 Thread Alexander
Dear colleagues, I have rather massive SQL query results to be fed as CSV to the client. What I currently did is mounted a separate mount point in Plack and defined a streaming interface: package DF::Stream; [... use, constants, etc ... ] method csv($psgi_env, $responder) { my $writer = $re

[Mason] Mason 2 and Dancer error.

2012-10-04 Thread Renato Tegon Forti
Hi All, I am trying run Mason2 on Dancer, but I get "Runtime Error". In apache2 I have modperl and: SetHandler perl-script PerlHandler Plack::Handler::Apache2 PerlSetVar psgi_app /home/ubuntu/MyWeb-App/bin/app.pl I have these modules installed as follows: curl -L h