[Catalyst] Questions about $c->write

Bernhard Graf catalyst2 at augensalat.de
Sat May 5 17:39:13 GMT 2007


Bernhard Graf wrote:

> > What bug are you seeing?
>
> I see syswrite() returning something binary - not a Perl integer as
> documented. This binary value can be unpack("U*", $rc)'ed to get the
> correct/expected value.

This is especially a problem when writing is not possible (client cuts 
the connection) where syswrite is expected to return a false (0) value:
In this case Catalyst::Engine::FastCGI::write() returns a one byte 
string containing a NULL which is regarded as true (the subsequent call 
to write() returns an empty string indicating failure if used in a 
boolean context).
-- 
Bernhard Graf



More information about the Catalyst mailing list