Branch Coverage

blib/lib/POE/Wheel/Run.pm
Criterion Covered Total %
branch 216 384 56.2


line true false branch
24 0 71 if $^O eq 'MacOS'
28 0 71 if ($@) { }
39 0 71 if ($@) { }
48 0 71 if (POE::Kernel::RUNNING_IN_HELL())
50 0 0 if ($@)
56 0 0 if ($@)
59 0 0 if ($@)
62 0 0 if ($@)
65 0 0 if ($@)
77 0 71 unless $max_open_fds
79 0 71 if $@
121 0 345 if @_ & 1
124 0 345 if @_ and ref $_[0] eq 'POE::Kernel'
127 0 345 unless defined $POE::Wheel::Run::poe_kernel
130 14 331 unless defined $program
133 250 81 unless defined $prog_args
134 0 331 unless ref $prog_args eq 'ARRAY'
138 331 0 unless defined $priority_delta
141 331 0 unless defined $close_on_call
158 56 275 if (defined $conduit) { }
159 14 4 if $conduit ne 'pipe' and $conduit ne 'pty' and $conduit ne 'pty-pipe' and $conduit ne 'socketpair' and $conduit ne 'inet'
166 24 18 unless ($conduit =~ /^pty(-pipe)?$/)
177 0 317 if ($winsize)
178 0 0 if not $conduit =~ /^pty(-pipe)?$/ and $winsize
181 0 0 if ('ARRAY' eq ref $winsize and 2 == @$winsize)
187 0 0 unless ref $winsize eq 'ARRAY' and scalar @$winsize == 4
198 0 317 if ($conduit eq 'pty' and defined $stderr_event)
224 2 315 if (defined $redir_output)
229 14 303 if (defined $redir_in and defined $stdin_event or defined $redir_out and defined $stdout_event or defined $redir_err and defined $stderr_event)
235 14 289 if (defined $stdio_filter) { }
236 14 0 if defined $params{'StdioFilter'}
238 0 0 if defined $stderr_event and not defined $stderr_filter
245 217 72 unless defined $stdio_filter
248 199 90 unless defined $stdin_filter
249 199 90 unless defined $stdout_filter
251 0 289 if ($conduit eq 'pty' and defined $stderr_filter) { }
256 225 64 unless defined $stderr_filter
260 0 289 if defined $stdin_event and not defined $stdin_filter
262 0 289 if defined $stdout_event and not defined $stdout_filter
264 0 289 if defined $stderr_event and not defined $stderr_filter
274 0 289 if (scalar keys %params)
282 249 40 unless (ref $program eq 'CODE')
283 0 249 unless defined fileno STDIN and fileno STDIN == 0
285 0 249 unless tied *STDOUT or defined fileno STDOUT and fileno STDOUT == 1
287 0 247 unless tied *STDERR or defined fileno STDERR and fileno STDERR == 2
297 2 287 if ($redir_output) { }
309 0 289 unless defined $sem_pipe_read
313 5 1 if (defined $stdout_event or defined $stdin_event or defined $stderr_event or not $no_stdin)
319 18 270 if ($conduit =~ /^pty(-pipe)?$/) { }
270 0 elsif ($conduit eq 'pipe') { }
322 0 18 if (defined $redir_err or defined $redir_in or defined $redir_out)
327 0 18 unless defined $stdout_read
328 8 10 if ($conduit eq 'pty-pipe')
330 0 8 unless defined $stderr_read and defined $stderr_write
348 589 221 if (defined $evname and not defined $$redir_ref)
350 0 589 unless defined $$rfd_ref and defined $$wfd_ref
354 268 2 unless (defined $redir_in or $no_stdin)
356 0 268 unless defined $stdin_write and defined $stdin_read
369 289 0 if ($POE::Wheel::Run::poe_kernel->can('_data_sig_mask_all'))
378 48 241 unless ($pid)
382 0 48 unless defined $pid
386 0 48 if (tied *STDIN)
391 0 48 if (tied *STDOUT)
396 1 47 if (tied *STDERR)
403 4 44 if ($conduit =~ /^pty(-pipe)?$/) { }
407 4 0 unless $no_setsid
414 0 4 unless defined $stdin_read
418 2 2 if $conduit eq 'pty'
425 0 4 if ($winsize)
438 44 0 unless $no_setpgrp
446 48 0 if $must_unmask
455 0 48 if ($priority_delta)
457 0 0 if (defined(my $priority = getpriority(0, $$))) { }
458 0 0 unless (setpriority 0, $$, $priority + $priority_delta)
466 0 0 if ($@)
473 0 48 if (defined $group_id)
479 0 48 if (defined $user_id)
484 47 1 if defined $stdin_write
485 46 2 if defined $stdout_read
486 29 19 if defined $stderr_read
488 0 48 if (POE::Kernel::RUNNING_IN_HELL()) { }
509 1 47 if (ref $program eq 'CODE')
517 0 1 if ($close_on_call)
519 0 0 if fileno STDIN == $_
520 0 0 if fileno STDOUT == $_
521 0 0 if fileno STDERR == $_
533 0 0 if ($@)
546 0 47 if POE::Kernel::RUNNING_IN_HELL()
555 47 0 if (ref $program eq 'ARRAY')
556 0 0 unless exec @$program, @$prog_args
562 0 0 unless exec join(' ', $program, @$prog_args)
569 226 15 if defined $stdin_read
570 224 17 if defined $stdout_write
571 158 83 if defined $stderr_write
576 14 227 if defined $stdout_read and ref $stdout_read eq 'IO::Pty'
580 0 241 if defined $stderr_read and ref $stderr_read eq 'IO::Pty'
585 237 4 if $stdout_event and $stdout_read
586 157 84 if $stderr_event and $stderr_read
621 241 0 if $must_unmask
629 0 241 if $chldout ne 'go'
633 239 2 if defined $stdin_write
634 237 4 if defined $stdout_read
635 157 84 if defined $stderr_read
673 0 113 if ($!) { }
674 0 0 if $$error_event
686 113 0 unless ($$stdin_octets)
688 33 80 if $$stdin_event
697 239 0 unless $$self[14]
711 0 237 unless defined $$self[15]
715 0 237 unless ($$stdout_event)
733 211 26 if ($stdout_filter->can('get_one') and $stdout_filter->can('get_one_start')) { }
745 47 178 if (defined(my $raw_input = $driver->get($handle))) { }
749 47 47 unless @$next_rec
756 88 90 if $$error_event
760 104 74 unless (--$$is_active)
761 31 73 if defined $$close_event
780 9 5 if (defined(my $raw_input = $driver->get($handle))) { }
786 5 0 if $$error_event
791 2 3 unless (--$$is_active)
792 2 0 if defined $$close_event
813 0 157 unless defined $$self[20]
817 0 157 unless ($$stderr_event)
833 137 20 if ($stderr_filter->can('get_one') and $stderr_filter->can('get_one_start')) { }
845 93 103 if (defined(my $raw_input = $driver->get($handle))) { }
849 93 90 unless @$next_rec
856 88 15 if $$error_event
860 74 29 unless (--$$is_active)
861 73 1 if defined $$close_event
880 4 3 if (defined(my $raw_input = $driver->get($handle))) { }
886 3 0 if $$error_event
890 3 0 unless (--$$is_active)
891 3 0 if defined $$close_event
909 0 120 if scalar @_ & 1
916 60 234 if ($name eq 'StdinEvent') { }
60 174 elsif ($name eq 'StdoutEvent') { }
54 120 elsif ($name eq 'StderrEvent') { }
60 60 elsif ($name eq 'ErrorEvent') { }
60 0 elsif ($name eq 'CloseEvent') { }
925 54 0 if ($$self[5] ne 'pty') { }
946 120 0 if $$self[18] and $$self[15]
947 108 12 if $$self[23] and $$self[20]
957 1 188 if ref 'POE::Kernel'->get_active_session eq 'POE::Kernel'
960 186 2 if ($$self[9])
965 187 1 if ($$self[13])
970 185 3 if ($$self[15])
974 185 3 if ($$self[19])
979 109 79 if ($$self[20])
983 109 79 if ($$self[24])
998 1 174 unless $$self[9]
1002 174 0 if ($$self[14] = $$self[11]->put($$self[10]->put(\@chunks)))
1018 0 1 unless defined $$self[15]
1024 0 1 unless defined $$self[20]
1030 0 1 unless defined $$self[15]
1036 0 1 unless defined $$self[20]
1043 0 1 unless defined $$self[9]
1048 1 0 if ($@ or $$self[9] != $$self[15])
1068 0 0 if (defined $buf)
1069 0 0 if ($old_output_filter->can('get_one') and $old_output_filter->can('get_one_start')) { }
1080 0 0 unless @$next_rec
1111 0 0 if (defined $buf)
1112 0 0 if ($old_output_filter->can('get_one') and $old_output_filter->can('get_one_start')) { }
1123 0 0 unless @$next_rec
1210 2 0 unless defined $signal
1211 0 2 if ($$self[25]) { }
1213 0 0 Win32::Process::KillProcess($$self[25], 293) ? :
1252 0 0 if defined $stdin_read
1257 0 0 if defined $stdout_write
1262 0 0 if defined $stderr_write
1270 861 6 unless defined $fspec
1271 6 0 if (ref $fspec) { }
1272 6 0 if (ref $fspec eq 'GLOB') { }
1289 48 0 if (defined $stdin_read)
1290 0 48 unless open STDIN, '<&' . fileno($stdin_read)
1296 47 1 if (defined $stdout_write)
1297 0 47 unless open STDOUT, '>&' . fileno($stdout_write)
1302 32 16 if (defined $stderr_write)
1303 0 32 unless open STDERR, '>&' . fileno($stderr_write)
1314 0 0 if defined fileno STDIN
1315 0 0 if defined fileno STDOUT
1316 0 0 if defined fileno STDERR
1321 0 0 if (not POE::Kernel::RUNNING_IN_HELL()) { }
1352 0 0 if ($close_on_call)
1354 0 0 if fileno STDIN == $_
1355 0 0 if fileno STDOUT == $_
1356 0 0 if fileno STDERR == $_
1363 0 0 if (ref $program eq 'ARRAY') { }
1365 0 0 /\s/ && !/"/ ? :
1373 0 0 /\s/ && !/"/ ? :
1382 0 0 unless ($w32job = 'Win32::Job'->new)
1391 0 0 unless ($w32pid = $w32job->spawn($appname, $cmdline))
1406 0 0 if defined fileno STDOUT
1407 0 0 if defined fileno STDERR