Matt Lawrence wrote:
Fayland Lam wrote:
sub test_body : Local {
my ($self, $c) = @_;
$c->res->body(*STDOUT);
print "a\n";
print "b\n";
}
Have you tried passing the glob as a reference?
$c->res->body(\*STDOUT);
It looks like that's at least part of your problem. I suspect that using
filehandles in this way is not going to work as you expect and may have
engine-specific problems, have you considered using $c->res->write as a
substitute for print?
mainly I want to use Benchmark in Catalyst Controller. so I guess I
can't use res->write in this case.
BTW, Thanks very much. \* is working perfect!
Matt
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
--
Fayland Lam // http://www.fayland.org/
Foorum based on Catalyst // http://www.foorumbbs.com/
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/