[Catalyst] problem on $c->res->body(*STDOUT);
    Andy Grundman 
    andy at hybridized.org
       
    Fri Mar 14 12:23:04 GMT 2008
    
    
  
On Mar 14, 2008, at 5:57 AM, 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?
Yeah, don't do that, you should use $c->res->write("a\n"); etc.
    
    
More information about the Catalyst
mailing list