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.13 by elmex, Thu May 15 13:32:19 2008 UTC vs.
Revision 1.14 by root, Sat May 17 19:05:51 2008 UTC

531 my $self = shift; 531 my $self = shift;
532 my $cb = pop; 532 my $cb = pop;
533 my $eol = @_ ? shift : qr|(\015?\012)|; 533 my $eol = @_ ? shift : qr|(\015?\012)|;
534 my $pos; 534 my $pos;
535 535
536 $eol = qr|(\Q$eol\E)| unless ref $eol; 536 $eol = quotemeta $eol unless ref $eol;
537 $eol = qr|^(.*?)($eol)|; 537 $eol = qr|^(.*?)($eol)|s;
538 538
539 sub { 539 sub {
540 $_[0]{rbuf} =~ s/$eol// or return; 540 $_[0]{rbuf} =~ s/$eol// or return;
541 541
542 $cb->($_[0], $1, $2); 542 $cb->($_[0], $1, $2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines