On April 30, 2014 11:24:32 AM Brian Brandes wrote:
> get '/buffertest' => sub {
> my $r = request->input_handle;
> $r->print("hello world");
> # ref $r == Apache2::RequestRec
> return;
> };
If all you are doing with the $r object is printing, maybe a little wrapper
could do the trick:
sub capture_output(&) {
open my $handle, '>', \my $output;
$_[0]->($handle);
return $output;
}
get '/' => sub {
return capture_output {
my $r = shift;
$r->print( "hello there!");
}
};
Joy,
`/anick
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users