diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
commit | a4c42bfb2337d37da89d789cb8cc226367994e32 (patch) | |
tree | c3eabdef5d565a4e515d2be0d9d4d0540bde0250 /Master/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm | |
parent | 8274475057f024d35332ac47c2e2f23ea156e6ed (diff) |
perl 5.14.2 from siep
git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/Master/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm b/Master/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm index a0a5a8ed32e..f4332c94503 100644 --- a/Master/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm +++ b/Master/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm @@ -13,21 +13,18 @@ my $IS_WIN32 = ( $^O =~ /^(MS)?Win32$/ ); =head1 NAME -TAP::Parser::Iterator::Process - Internal TAP::Parser Iterator +TAP::Parser::Iterator::Process - Iterator for process-based TAP sources =head1 VERSION -Version 3.17 +Version 3.23 =cut -$VERSION = '3.17'; +$VERSION = '3.23'; =head1 SYNOPSIS - # see TAP::Parser::IteratorFactory for preferred usage - - # to use directly: use TAP::Parser::Iterator::Process; my %args = ( command => ['python', 'setup.py', 'test'], @@ -41,8 +38,8 @@ $VERSION = '3.17'; =head1 DESCRIPTION This is a simple iterator wrapper for executing external processes, used by -L<TAP::Parser>. Unless you're subclassing, you probably won't need to use -this module directly. +L<TAP::Parser>. Unless you're writing a plugin or subclassing, you probably +won't need to use this module directly. =head1 METHODS @@ -80,12 +77,18 @@ Get the exit status for this iterator's process. =cut -eval { require POSIX; &POSIX::WEXITSTATUS(0) }; -if ($@) { - *_wait2exit = sub { $_[1] >> 8 }; -} -else { - *_wait2exit = sub { POSIX::WEXITSTATUS( $_[1] ) } +{ + + local $^W; # no warnings + # get around a catch22 in the test suite that causes failures on Win32: + local $SIG{__DIE__} = undef; + eval { require POSIX; &POSIX::WEXITSTATUS(0) }; + if ($@) { + *_wait2exit = sub { $_[1] >> 8 }; + } + else { + *_wait2exit = sub { POSIX::WEXITSTATUS( $_[1] ) } + } } sub _use_open3 { @@ -117,6 +120,8 @@ sub _initialize { my @command = @{ delete $args->{command} || [] } or die "Must supply a command to execute"; + $self->{command} = [@command]; + # Private. Used to frig with chunk size during testing. my $chunk_size = delete $args->{_chunk_size} || 65536; @@ -371,7 +376,6 @@ Originally ripped off from L<Test::Harness>. L<TAP::Object>, L<TAP::Parser>, L<TAP::Parser::Iterator>, -L<TAP::Parser::IteratorFactory>, =cut |