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.5 by elmex, Mon Apr 28 08:01:05 2008 UTC vs.
Revision 1.7 by root, Thu May 1 16:35:40 2008 UTC

1package AnyEvent::Handle; 1package AnyEvent::Handle;
2 2
3use warnings; 3no warnings;
4use strict; 4use strict;
5 5
6use AnyEvent; 6use AnyEvent;
7use IO::Handle; 7use IO::Handle;
8use Errno qw/EAGAIN EINTR/; 8use Errno qw/EAGAIN EINTR/;
93 93
94These are shortcuts, that will call the corresponding method and set the callback to C<$cb>. 94These are shortcuts, that will call the corresponding method and set the callback to C<$cb>.
95 95
96=item on_readline => $cb 96=item on_readline => $cb
97 97
98The C<readlines> method is called with the default seperator and C<$cb> as callback 98The C<readlines> method is called with the default separated and C<$cb> as callback
99for you. 99for you.
100 100
101=back 101=back
102 102
103=cut 103=cut
255 255
256=item B<readlines ($callback)> 256=item B<readlines ($callback)>
257 257
258=item B<readlines ($sep, $callback)> 258=item B<readlines ($sep, $callback)>
259 259
260This method will read lines from the filehandle, seperated by C<$sep> or C<"\n"> 260This method will read lines from the filehandle, separated by C<$sep> or C<"\n">
261if C<$sep> is not provided. C<$sep> will be used as "line" seperator. 261if C<$sep> is not provided. C<$sep> will be used as "line" separated.
262 262
263The C<$callback> will be called when at least one 263The C<$callback> will be called when at least one
264line could be read. The first argument to the C<$callback> will be the L<AnyEvent::Handle> 264line could be read. The first argument to the C<$callback> will be the L<AnyEvent::Handle>
265object itself and the rest of the arguments will be the read lines. 265object itself and the rest of the arguments will be the read lines.
266 266

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines