1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
package TAP::Parser::Iterator::PherkinStream;
$TAP::Parser::Iterator::PherkinStream::VERSION = '0.75';
=head1 NAME
TAP::Parser::Iterator::PherkinStream - Stream with TAP from async BDD process
=head1 VERSION
version 0.75
=cut
use strict;
use warnings;
use base 'TAP::Parser::Iterator::Stream';
sub _initialize {
my ($self, $fh, $pherkin, $child_pid) = @_;
$self->{pherkin} = $pherkin;
$self->{child_pid} = $child_pid;
return $self->SUPER::_initialize($fh);
}
sub _finish {
my $self = shift;
$self->{pherkin}->_post_run();
if ($self->{child_pid}) {
waitpid $self->{child_pid}, 0; # reap child process
}
return $self->SUPER::_finish(@_);
}
sub get_select_handles {
my $self = shift;
# return our handle in case it's a socket or pipe (select()-able)
return ( $self->{fh}, )
if (-S $self->{fh} || -p $self->{fh});
return;
}
1;
|