Skip to content

Commit

Permalink
TAP::Parser::Iterator::Process cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bulk88 authored and Leont committed Nov 12, 2024
1 parent 6e7e689 commit 7b0e6ce
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/TAP/Parser/Iterator/Process.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use IO::Handle;

use base 'TAP::Parser::Iterator';

my $IS_WIN32 = ( $^O =~ /^(MS)?Win32$/ );
use constant IS_WIN32 => !!( $^O =~ /^(MS)?Win32$/ );

=head1 NAME
Expand Down Expand Up @@ -91,8 +91,7 @@ Get the exit status for this iterator's process.
}

sub _use_open3 {
my $self = shift;
return unless $Config{d_fork} || $IS_WIN32;
return unless $Config{d_fork} || IS_WIN32;
for my $module (qw( IPC::Open3 IO::Select )) {
eval "use $module";
return if $@;
Expand Down Expand Up @@ -147,7 +146,7 @@ sub _initialize {

# }}}

if ($IS_WIN32) {
if (IS_WIN32) {
$err = $merge ? '' : '>&STDERR';
eval {
$pid = open3(
Expand Down Expand Up @@ -340,7 +339,7 @@ sub _finish {

# Sometimes we get -1 on Windows. Presumably that means status not
# available.
$status = 0 if $IS_WIN32 && $status == -1;
$status = 0 if IS_WIN32 && $status == -1;

$self->{wait} = $status;
$self->{exit} = $self->_wait2exit($status);
Expand Down

0 comments on commit 7b0e6ce

Please sign in to comment.