ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Handle.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.11 by root, Sun May 11 17:54:13 2008 UTC vs.
Revision 1.12 by elmex, Thu May 15 09:03:43 2008 UTC

485sub _read_chunk($$) { 485sub _read_chunk($$) {
486 my ($self, $len, $cb) = @_; 486 my ($self, $len, $cb) = @_;
487 487
488 sub { 488 sub {
489 $len <= length $_[0]{rbuf} or return; 489 $len <= length $_[0]{rbuf} or return;
490 $cb->($self, $_[0], substr $_[0]{rbuf}, 0, $len, ""); 490 $cb->($_[0], substr $_[0]{rbuf}, 0, $len, "");
491 1 491 1
492 } 492 }
493} 493}
494 494
495sub push_read_chunk { 495sub push_read_chunk {
537 $eol = qr|^(.*?)($eol)|; 537 $eol = qr|^(.*?)($eol)|;
538 538
539 sub { 539 sub {
540 $_[0]{rbuf} =~ s/$eol// or return; 540 $_[0]{rbuf} =~ s/$eol// or return;
541 541
542 $cb->($self, $1, $2); 542 $cb->($_[0], $1, $2);
543 1 543 1
544 } 544 }
545} 545}
546 546
547sub push_read_line { 547sub push_read_line {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines