use
vars (
qw($VERSION @ISA)
);
@ISA
=
'TAP::Parser::Iterator::Stream'
;
$VERSION
=
'0.01'
;
sub
_initialize {
my
(
$self
,
$args
) =
@_
;
unless
(
$args
->{handle} ) {
die
"handle argument must be specified.\n"
;
}
my
$chunk_size
=
delete
$args
->{_chunk_size} || 65536;
return
unless
(
$self
->SUPER::_initialize(
$args
->{handle} ) );
$self
->{out} =
$args
->{handle};
$self
->{err} =
$args
->{handle};
$self
->{sel} = IO::Select->new(
$args
->{handle} );
$self
->{pid} =
''
;
$self
->{
exit
} =
undef
;
$self
->{chunk_size} =
$chunk_size
;
return
$self
;
}
sub
get_select_handles {
my
$self
=
shift
;
return
grep
$_
, (
$self
->{out},
$self
->{err} );
}
1;