December 2000
Intermediate to advanced
784 pages
20h 54m
English
This module works with IO::LineBufferedSet to provide line-oriented reading in a nonblocking multiplexed application. It inherits from IO::SessionData, which is listed in Chapter 13.
0 package IO::LineBufferedSessionData; 1 # file: IO/LineBufferedSessionData.pm 2 use strict; 3 use Carp; 4 use IO::SessionData; 5 use Errno 'EWOULDBLOCK'; 6 use IO::SessionData; 7 use IO::LineBufferedSet; 8 use vars '@ISA','$VERSION'; 9 @ISA = 'IO::SessionData'; 10 $VERSION = 1.00; 11 use constant BUFSIZE => 3000; 12 # override new() by adding new instance variables 13 sub new { 14 my $pack = shift; 15 my $self = $pack->SUPER::new(@_); 16 @{$self}{qw(read_limit inbuffer linemode index eof error)} = (BUFSIZE,' ', 0,0,0,0); ...Read now
Unlock full access