Branch Coverage

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


line true false branch
24 0 72 if $^O eq 'MacOS'
28 0 72 if ($@) { }
39 0 72 if ($@) { }
48 0 72 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 72 unless $max_open_fds
79 0 72 if $@
121 0 363 if @_ & 1
124 0 363 if @_ and ref $_[0] eq 'POE::Kernel'
127 0 363 unless defined $POE::Wheel::Run::poe_kernel
130 15 348 unless defined $program
133 256 92 unless defined $prog_args
134 0 348 unless ref $prog_args eq 'ARRAY'
138 348 0 unless defined $priority_delta
141 348 0 unless defined $close_on_call
158 64 284 if (defined $conduit) { }
159 15 4 if $conduit ne 'pipe' and $conduit ne 'pty' and $conduit ne 'pty-pipe' and $conduit ne 'socketpair' and $conduit ne 'inet'
166 27 22 unless ($conduit =~ /^pty(-pipe)?$/)
177 0 333 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 333 if ($conduit eq 'pty' and defined $stderr_event)
224 3 330 if (defined $redir_output)
229 15 318 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 15 303 if (defined $stdio_filter) { }
236 15 0 if defined $params{'StdioFilter'}
238 0 0 if defined $stderr_event and not defined $stderr_filter
245 220 83 unless defined $stdio_filter
248 213 90 unless defined $stdin_filter
249 213 90 unless defined $stdout_filter
251 0 303 if ($conduit eq 'pty' and defined $stderr_filter) { }
256 230 73 unless defined $stderr_filter
260 0 303 if defined $stdin_event and not defined $stdin_filter
262 0 303 if defined $stdout_event and not defined $stdout_filter
264 0 303 if defined $stderr_event and not defined $stderr_filter
274 0 303 if (scalar keys %params)
282 255 48 unless (ref $program eq 'CODE')
283 0 255 unless defined fileno STDIN and fileno STDIN == 0
285 0 255 unless tied *STDOUT or defined fileno STDOUT and fileno STDOUT == 1
287 0 253 unless tied *STDERR or defined fileno STDERR and fileno STDERR == 2
297 3 300 if ($redir_output) { }
309 0 303 unless defined $sem_pipe_read
313 7 2 if (defined $stdout_event or defined $stdin_event or defined $stderr_event or not $no_stdin)
319 22 279 if ($conduit =~ /^pty(-pipe)?$/) { }
279 0 elsif ($conduit eq 'pipe') { }
322 0 22 if (defined $redir_err or defined $redir_in or defined $redir_out)
327 0 22 unless defined $stdout_read
328 10 12 if ($conduit eq 'pty-pipe')
330 0 10 unless defined $stderr_read and defined $stderr_write
348 610 227 if (defined $evname and not defined $$redir_ref)
350 0 610 unless defined $$rfd_ref and defined $$wfd_ref
354 276 3 unless (defined $redir_in or $no_stdin)
356 0 276 unless defined $stdin_write and defined $stdin_read
369 303 0 if ($POE::Wheel::Run::poe_kernel->can('_data_sig_mask_all'))
378 48 255 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 235 20 if defined $stdin_read
570 232 23 if defined $stdout_write
571 168 87 if defined $stderr_write
576 18 237 if defined $stdout_read and ref $stdout_read eq 'IO::Pty'
580 0 255 if defined $stderr_read and ref $stderr_read eq 'IO::Pty'
585 248 7 if $stdout_event and $stdout_read
586 166 89 if $stderr_event and $stderr_read
621 255 0 if $must_unmask
629 0 255 if $chldout ne 'go'
633 251 4 if defined $stdin_write
634 248 7 if defined $stdout_read
635 166 89 if defined $stderr_read
673 0 146 if ($!) { }
674 0 0 if $$error_event
686 146 0 unless ($$stdin_octets)
688 66 80 if $$stdin_event
697 251 0 unless $$self[14]
711 0 248 unless defined $$self[15]
715 0 248 unless ($$stdout_event)
733 217 31 if ($stdout_filter->can('get_one') and $stdout_filter->can('get_one_start')) { }
745 57 184 if (defined(my $raw_input = $driver->get($handle))) { }
749 57 57 unless @$next_rec
756 94 90 if $$error_event
760 137 47 unless (--$$is_active)
761 63 74 if defined $$close_event
780 18 10 if (defined(my $raw_input = $driver->get($handle))) { }
786 10 0 if $$error_event
791 5 5 unless (--$$is_active)
792 5 0 if defined $$close_event
813 0 166 unless defined $$self[20]
817 0 166 unless ($$stderr_event)
833 143 23 if ($stderr_filter->can('get_one') and $stderr_filter->can('get_one_start')) { }
845 104 109 if (defined(my $raw_input = $driver->get($handle))) { }
849 104 98 unless @$next_rec
856 94 15 if $$error_event
860 47 62 unless (--$$is_active)
861 47 0 if defined $$close_event
880 8 6 if (defined(my $raw_input = $driver->get($handle))) { }
886 6 0 if $$error_event
890 5 1 unless (--$$is_active)
891 5 0 if defined $$close_event
909 0 142 if scalar @_ & 1
916 71 276 if ($name eq 'StdinEvent') { }
71 205 elsif ($name eq 'StdoutEvent') { }
63 142 elsif ($name eq 'StderrEvent') { }
71 71 elsif ($name eq 'ErrorEvent') { }
71 0 elsif ($name eq 'CloseEvent') { }
925 63 0 if ($$self[5] ne 'pty') { }
946 142 0 if $$self[18] and $$self[15]
947 126 16 if $$self[23] and $$self[20]
957 2 201 if ref 'POE::Kernel'->get_active_session eq 'POE::Kernel'
960 197 4 if ($$self[9])
965 199 2 if ($$self[13])
970 196 5 if ($$self[15])
974 196 5 if ($$self[19])
979 118 83 if ($$self[20])
983 118 83 if ($$self[24])
998 2 210 unless $$self[9]
1002 210 0 if ($$self[14] = $$self[11]->put($$self[10]->put(\@chunks)))
1018 0 2 unless defined $$self[15]
1024 0 2 unless defined $$self[20]
1030 0 2 unless defined $$self[15]
1036 0 2 unless defined $$self[20]
1043 0 2 unless defined $$self[9]
1048 2 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 4 0 unless defined $signal
1211 0 4 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 900 9 unless defined $fspec
1271 9 0 if (ref $fspec) { }
1272 9 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