Branch Coverage

blib/lib/ClearCase/ClearPrompt.pm
Criterion Covered Total %
branch 21 270 7.7


line true false branch
21 0 2 ($^O || $ENV{'OS'}) =~ /MSWin32|Windows_NT/i ? :
45 0 0 if $ENV{'PERL_DL_NONLAZY'}
47 0 0 if (MSWIN()) { }
49 0 0 if /\s/
51 0 0 if $ENV{'ATRIA_FORCE_GUI'}
53 0 0 if $ENV{'ATRIA_FORCE_GUI'}
55 0 0 if (MSWIN()) { }
68 0 0 if $ENV{'PERL_DL_NONLAZY'}
70 0 0 MSWIN() ? :
0 0 unless $cmd and -x $cmd
71 0 0 if ($ENV{'ATRIA_FORCE_GUI'})
72 0 0 if (MSWIN()) { }
78 0 0 if system $cmd
94 0 1 if (MSWIN()) { }
110 0 0 MSWIN() ? :
116 0 0 if $tmpf
120 0 0 $custom ? :
121 0 0 unless -f $tmpf
133 0 0 if $ENV{'ATRIA_WEB_GUI'}
142 0 0 if ($TriggerSeries and $ENV{'CLEARCASE_SERIES_ID'} and not $ENV{'CLEARCASE_SERIES_ID'} =~ /^[0:.]+$/)
146 0 0 if (not $ENV{'CLEARCASE_BEGIN_SERIES'} and -f $StashFile)
148 0 0 if ($ENV{'CLEARCASE_END_SERIES'} and not $ENV{'CLEARCASE_CLEARPROMPT_KEEP_CAPTURE'})
155 0 0 defined $data ? :
166 0 0 if (MSWIN())
169 0 0 if ($args[$i] =~ /^-(?:pro|ite|def|dfi|dir)/)
184 0 0 if ($mode =~ /text|file|list/) { }
187 0 0 if $Verbose
188 0 0 if (not system(@cmd)) { }
189 0 0 if (open OUTFILE, $outf)
192 0 0 unless defined $data
199 0 0 if $? == 1024
200 0 0 if $? and $? <= 128
202 0 0 if -f $outf
203 0 0 defined $data ? :
207 0 0 if $Verbose
208 0 0 if (defined wantarray) { }
210 0 0 if $? == 1024
211 0 0 $? && $? <= 128 ? :
212 0 0 defined $data ? :
216 0 0 if (MSWIN()) { }
0 0 elsif (exists $ENV{'DISPLAY'}) { }
222 0 0 if fork
236 0 0 if ($StashFile)
237 0 0 if ($ENV{'CLEARCASE_BEGIN_SERIES'} and not $ENV{'CLEARCASE_END_SERIES'})
240 0 0 if ($@ or $] < 5.004) { }
243 0 0 unless open STASH, ">>$StashFile"
244 0 0 if $top
248 0 0 unless ($ENV{'CLEARCASE_CLEARPROMPT_KEEP_CAPTURE'})
266 0 0 if $dir eq '.'
268 0 0 if $ENV{'ATRIA_WEB_GUI'}
271 0 0 if (opendir DIR, $dir) { }
272 0 0 unless -d "$dir/$_"
281 0 0 if (MSWIN() and $dir =~ m[^[A-Z]:[\\/]?$]i) { }
284 0 0 unless @drives
291 0 0 unless (defined $resp)
296 0 0 if not $resp or $resp eq '.'
297 0 0 if (MSWIN() and $resp =~ m[^[A-Z]:[\\/]?$]i) { }
299 0 0 unless chdir $dir
304 0 0 unless chdir $iwd
312 0 0 unless defined fileno SAVE_STDOUT
313 0 0 unless defined fileno SAVE_STDERR
319 0 0 if ($stream ne 'STDOUT' and $stream ne 'STDERR')
324 0 0 if ($stream eq 'STDOUT') { }
0 0 elsif ($stream eq 'STDERR') { }
325 0 0 if ($state =~ /^OFF$/i) { }
0 0 elsif ($state =~ /^ON$/i) { }
326 0 0 if (defined fileno STDOUT)
327 0 0 unless defined fileno HIDE_STDOUT
334 0 0 if (defined fileno STDOUT)
335 0 0 unless defined fileno HIDE_STDOUT
337 0 0 unless open STDOUT, $state
341 0 0 if ($state =~ /^OFF$/i) { }
0 0 elsif ($state =~ /^ON$/i) { }
342 0 0 if (defined fileno STDERR)
343 0 0 unless defined fileno HIDE_STDERR
350 0 0 if (defined fileno STDERR)
351 0 0 unless defined fileno HIDE_STDERR
353 0 0 unless open STDERR, $state
368 0 0 unless @$r_to
372 0 0 unless ($@)
376 0 0 if ($smtp)
378 0 0 if $smtp->mail($name) and $smtp->to(@$r_to, {'SkipBad', 1}) and $smtp->data and $smtp->datasend("To: @$r_to\n") and $smtp->datasend("Subject: $subj\n") and $smtp->datasend(join(' ', 'X-Mailer:', 'ClearCase::ClearPrompt', $VERSION)) and $smtp->datasend("\n") and $smtp->datasend(@body) and $smtp->dataend and $smtp->quit
393 0 0 MSWIN() ? :
396 0 0 if (open NOTIFY, "| $notify")
406 0 0 if defined $ENV{'CLEARCASE_CLEARPROMPT_NO_SENDMSG'}
408 0 0 unless exists $MailTo{$type} and $MailTo{$type}
413 0 0 unless $@
448 1 0 if (exists $cmds{'TRIGGERSERIES'} or exists $caps{'TRIGGERSERIES'})
451 1 0 unless exists $ENV{'CLEARCASE_CLEARPROMPT_TRIGGERSERIES'}
459 0 1 if (MSWIN() and exists $cmds{'ENV'})
461 0 0 if /^CLEARCASE_/
467 0 1 if exists $cmds{'DEBUG'}
471 0 1 if exists $cmds{'SHELL'}
474 0 1 if ($ENV{'CLEARCASE_CLEARPROMPT_CAPTURE_LIST'})
491 0 0 unless $EXPORT_TAGS{$tag}
498 0 1 if exists $caps{'DIE'} or exists $caps{'CAPTURE'} or exists $caps{'ERRORS'}
502 0 1 if exists $caps{'WARN'} or exists $caps{'CAPTURE'} or exists $caps{'ERRORS'}
507 0 1 if ($] <= 5.001) { }
510 0 0 if $caller eq 'DB'
512 0 0 if (s/^(\W)//) { }
527 0 1 if (exists $Dialogs{'CAPTURE'}) { }
0 1 elsif (exists $Dialogs{'ERRORS'}) { }
539 0 1 if (exists $Mailings{'CAPTURE'}) { }
0 1 elsif (exists $Mailings{'ERRORS'}) { }
553 0 1 if $Mailings{'WARN'}
554 0 1 if $Mailings{'DIE'}
555 0 1 if $Mailings{'STDOUT'}
556 0 1 if $Mailings{'STDERR'}
557 0 1 if $Mailings{'PROMPT'}
560 0 1 if (exists $caps{'STDOUT'} or exists $caps{'STDERR'})
565 0 0 if (exists $caps{'STDOUT'} and $ENV{'ATRIA_FORCE_GUI'} || $caps{'STDOUT'})
567 0 0 unless open STDOUT, ">$tmpout"
569 0 0 if (exists $caps{'STDERR'} and $ENV{'ATRIA_FORCE_GUI'} || $caps{'STDERR'})
571 0 0 unless open STDERR, ">$tmperr"
582 0 0 if (defined fileno HOLDOUT)
586 0 0 if (defined fileno HOLDERR)
592 0 0 if (defined $tmpout and -e $tmpout)
593 0 0 unless open OUT, $tmpout
596 0 0 if (@msg)
598 0 0 if ($Dialogs{'STDOUT'})
603 0 0 unless ($ENV{'CLEARCASE_CLEARPROMPT_KEEP_CAPTURE'})
608 0 0 if (MSWIN()) { }
611 0 0 unless unlink $tmpout
616 0 0 if (defined $tmperr and -e $tmperr)
619 0 0 unless open ERR, $tmperr
624 0 0 if (@msg)
626 0 0 if ($Dialogs{'STDERR'})
631 0 0 if (not $ENV{'CLEARCASE_CLEARPROMPT_KEEP_CAPTURE'})
632 0 0 if (MSWIN()) { }
635 0 0 unless unlink $tmperr
648 0 0 if ($ENV{'CLEARCASE_CLEARPROMPT_SHOW_LINENO'})
654 0 0 if ($ENV{'ATRIA_FORCE_GUI'} and $Dialogs{'WARN'}) { }
666 0 0 if ($ENV{'CLEARCASE_CLEARPROMPT_SHOW_LINENO'})
672 0 0 if ($ENV{'ATRIA_FORCE_GUI'} and $Dialogs{'DIE'}) { }
674 0 0 unless exit $! or $? >> 8