Skip to content

Commit 7b0e6ce

Browse files
bulk88Leont
authored andcommitted
TAP::Parser::Iterator::Process cleanup
1 parent 6e7e689 commit 7b0e6ce

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/TAP/Parser/Iterator/Process.pm

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use IO::Handle;
88

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

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

1313
=head1 NAME
1414
@@ -91,8 +91,7 @@ Get the exit status for this iterator's process.
9191
}
9292

9393
sub _use_open3 {
94-
my $self = shift;
95-
return unless $Config{d_fork} || $IS_WIN32;
94+
return unless $Config{d_fork} || IS_WIN32;
9695
for my $module (qw( IPC::Open3 IO::Select )) {
9796
eval "use $module";
9897
return if $@;
@@ -147,7 +146,7 @@ sub _initialize {
147146

148147
# }}}
149148

150-
if ($IS_WIN32) {
149+
if (IS_WIN32) {
151150
$err = $merge ? '' : '>&STDERR';
152151
eval {
153152
$pid = open3(
@@ -340,7 +339,7 @@ sub _finish {
340339

341340
# Sometimes we get -1 on Windows. Presumably that means status not
342341
# available.
343-
$status = 0 if $IS_WIN32 && $status == -1;
342+
$status = 0 if IS_WIN32 && $status == -1;
344343

345344
$self->{wait} = $status;
346345
$self->{exit} = $self->_wait2exit($status);

0 commit comments

Comments
 (0)