ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/eg/handle
(Generate patch)

Comparing AnyEvent/eg/handle (file contents):
Revision 1.3 by root, Sat May 24 23:34:28 2008 UTC vs.
Revision 1.4 by root, Thu Aug 6 14:00:36 2009 UTC

7my $cv = AnyEvent->condvar; 7my $cv = AnyEvent->condvar;
8 8
9my $ae_fh = 9my $ae_fh =
10 AnyEvent::Handle->new ( 10 AnyEvent::Handle->new (
11 fh => \*STDIN, 11 fh => \*STDIN,
12 on_eof => sub { $cv->broadcast } 12 on_error => sub { $cv->broadcast }
13 ); 13 );
14 14
15$ae_fh->push_read (line => sub { 15$ae_fh->push_read (line => sub {
16 my ($ae_fh, $line) = @_; 16 my ($ae_fh, $line) = @_;
17 print "Got line [$line]\n"; 17 print "Got line [$line]\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines