--- AnyEvent/lib/AnyEvent/Handle.pm 2011/09/01 04:07:18 1.223 +++ AnyEvent/lib/AnyEvent/Handle.pm 2012/01/10 13:32:23 1.227 @@ -13,7 +13,7 @@ fh => \*STDIN, on_error => sub { my ($hdl, $fatal, $msg) = @_; - AE::log warn => "got error $msg\n"; + AE::log error => "got error $msg\n"; $hdl->destroy; $cv->send; }; @@ -24,7 +24,7 @@ # read the response line $hdl->push_read (line => sub { my ($hdl, $line) = @_; - AE::log warn => "got line <$line>\n"; + say "got line <$line>"; $cv->send; }); @@ -1083,7 +1083,7 @@ register_write_type storable => sub { my ($self, $ref) = @_; - require Storable; + require Storable unless $Storable::VERSION; pack "w/a*", Storable::nfreeze ($ref) }; @@ -1434,7 +1434,7 @@ Example: read 2 bytes. $handle->push_read (chunk => 2, sub { - AE::log debug => "yay " . unpack "H*", $_[1]; + say "yay " . unpack "H*", $_[1]; }); =cut @@ -1478,7 +1478,7 @@ sub { $_[0]{rbuf} =~ s/^([^\015\012]*)(\015?\012)// or return; - $cb->($_[0], $1, $2); + $cb->($_[0], "$1", "$2"); 1 } } else { @@ -1488,7 +1488,7 @@ sub { $_[0]{rbuf} =~ s/$eol// or return; - $cb->($_[0], $1, $2); + $cb->($_[0], "$1", "$2"); 1 } } @@ -1713,7 +1713,7 @@ register_read_type storable => sub { my ($self, $cb) = @_; - require Storable; + require Storable unless $Storable::VERSION; sub { # when we can use 5.10 we can use ".", but for 5.8 we use the re-pack method @@ -1794,7 +1794,7 @@ during a rehandshake. As a guideline, during the initial handshake, you should not stop reading, -and as a client, it might cause problems, depending on your applciation. +and as a client, it might cause problems, depending on your application. =cut