Branch Coverage

blib/lib/ClearCase/Argv.pm
Criterion Covered Total %
branch 4 376 1.0


line true false branch
7 0 1 $^O =~ /MSWin|Windows_NT/i ? :
8 0 1 $^O =~ /cygwin/i ? :
76 0 0 if (ref $self and $$self{'CT'}) { }
77 0 0 if @_
80 0 0 if @_
89 0 0 unless open my $fd, '<', $_
92 0 0 if $line =~ /^(#!|\@rem ).*\bperl\b/i
98 0 0 if (ref $self) { }
99 0 0 if (@_) { }
100 0 0 if ($self->ipc) { }
104 0 0 ref $_[0] ? :
107 0 0 ref $_[0] ? :
109 0 0 if $self->perlscript
110 0 0 defined wantarray ? :
112 0 0 $$self{'CT'} ? :
124 0 0 unless @_
126 0 0 if (@_ or ref $prg or $prg =~ m[^/|^\S*(?:clear|multi)tool] or $self->ctcmd) { }
131 0 0 unless s/^'(.*)'$/$1/
139 0 0 if not ref $_[0] or ref $_[0] eq 'HASH'
141 0 0 if ($self->ctcmd) { }
0 0 elsif ($self->ipc) { }
154 0 0 if not ref $_[0] or ref $_[0] eq 'HASH'
159 0 0 unless ($self->ctcmd or $self->ipc)
172 0 0 if $self->autoglob
179 0 0 if %Argv::Summary
180 0 0 if $ifd
181 0 0 if ($self->noexec and not $self->_read_only)
188 0 0 if ($self->quiet) { }
0 0 elsif ($ofd == 2) { }
0 0 elsif (not $ofd =~ /^\d*$/) { }
191 0 0 unless open STDOUT, '>&STDERR'
193 0 0 unless open STDOUT, $ofd
195 0 0 if $ofd > 2
196 0 0 if ($ofd == 0)
198 0 0 if $self->ipc
201 0 0 if $dbg and $self->ctcmd
202 0 0 if ($efd == 1) { }
0 0 elsif (not $efd =~ /^\d*$/) { }
203 0 0 unless open STDERR, '>&STDOUT'
205 0 0 unless open STDERR, $efd
207 0 0 if $efd > 2
208 0 0 if $efd == 0
211 0 0 if ($self->ctcmd) { }
213 0 0 if ($envp) { }
221 0 0 if ($cmd[0] eq 'setview')
222 0 0 if ($cmd[1] eq '-exec')
228 0 0 if (@data) { }
229 0 0 if ($efd == 2) { }
0 0 elsif ($efd == 1) { }
235 0 0 if @err
245 0 0 if $dbg > 1
246 0 0 if $rc
253 0 0 if not ref $_[0] or ref $_[0] eq 'HASH'
258 0 0 unless ($self->ctcmd or $self->ipc)
263 0 0 wantarray ? :
271 0 0 if $self->autoglob
277 0 0 if %Argv::Summary
278 0 0 if $ifd
279 0 0 if ($self->noexec and not $self->_read_only)
283 0 0 if $dbg and $self->ctcmd
284 0 0 if ($self->ctcmd) { }
286 0 0 if ($envp) { }
293 0 0 if ($data)
294 0 0 if (not $ofd) { }
0 0 elsif ($ofd == 2) { }
300 0 0 if ($errors)
301 0 0 if ($efd == 1) { }
0 0 elsif ($efd == 2) { }
307 0 0 if $dbg > 1
308 0 0 if (wantarray) { }
310 0 0 unless ($self->autochomp)
314 0 0 if @data and $dbg >= 2
315 0 0 if ($rc)
322 0 0 if $self->autochomp
324 0 0 if $data and $dbg >= 2
325 0 0 if ($rc)
333 0 0 if ($cmd[0] eq 'setview')
334 0 0 if ($cmd[1] eq '-exec')
336 0 0 if $self->autochomp
337 0 0 wantarray ? :
342 0 0 if ($efd == 2) { }
0 0 elsif ($efd == 1) { }
345 0 0 wantarray ? :
351 0 0 if $dbg > 1
352 0 0 if (wantarray) { }
353 0 0 if $self->autochomp
355 0 0 if ($rc)
363 0 0 if $self->autochomp
365 0 0 if ($rc)
377 0 0 if not ref $_[0] or ref $_[0] eq 'HASH'
381 0 0 if ($self->ctcmd) { }
0 0 elsif ($self->ipc) { }
386 0 0 if ($mode) { }
388 0 0 if $self->dbglevel
390 0 0 if ($mode eq 'CtCmd') { }
393 0 0 unless grep /(?:clear|multi)tool/, @prg
435 0 0 if /^.*?\S+\@@/
447 0 0 unless defined $level or defined wantarray
448 0 0 if ($level)
449 0 0 if ($self->ipc and 1)
453 0 0 if ($@)
455 0 0 if ($level == 2 and $msg =~ /^(Can't locate \S+)/) { }
0 0 elsif ($level > 2) { }
460 0 0 if ($level == 1 or $level == 2) { }
480 0 0 if $level == 2
491 0 0 if (defined $level) { }
492 0 0 if ($level) { }
493 0 0 if $ClearCase::CtCmd::VERSION
501 0 0 if exists $$self{'CCAV_CTCMD'}
502 0 0 if $ENV{'CLEARCASE_ARGV_CTCMD'} and not ref $self
507 0 0 unless (defined $$self{'CCAV_CTCMD'} or defined $$class{'CCAV_CTCMD'})
508 0 0 $ENV{'CLEARCASE_ARGV_CTCMD'} ? :
510 0 0 $$self{'CCAV_CTCMD'} || $$class{'CCAV_CTCMD'} ? :
529 0 0 ref $_[0] ? :
534 0 0 @_ == 1 ? :
539 0 0 $rc ? :
543 0 0 if $_
546 0 0 if ($err)
551 0 0 if $self
553 0 0 if (defined $out) { }
554 0 0 if ($self and exists $$self{'outfunc'} and $$self{'outfunc'} == 0) { }
562 0 0 if ($self and exists $$self{'errfunc'} and $$self{'errfunc'} == 0) { }
567 0 0 if (wantarray) { }
570 0 0 if $rc
571 0 0 if defined $results[2]
583 1 0 if (defined $level and not $level) { }
0 0 elsif (not defined $level) { }
584 1 0 unless exists $$self{'IPC'}
588 0 0 if --$pidcount{$pid}
596 0 0 exists $$self{'IPC'} ? :
599 0 0 if ($self->ctcmd)
602 0 0 if (exists $$class{'IPC'} and $level =~ /^\d+$/ and not $$self{'CT'} and not $$class{'CT'} or $$self{'CT'} and $$class{'CT'} and $$self{'CT'} eq $$class{'CT'})
605 0 0 if ($self ne $class and not $self->ipc)
619 0 0 $level =~ /^\d+$/ ? :
620 0 0 !$view ? :
627 0 0 if ($view)
630 0 0 if /^Command 1 returned status/
631 0 0 unless /^$/
647 0 0 if s[^(vob:)?/cygdrive/([A-Za-z])][$1$2:]
648 0 0 if s[^(vob:)?/view][$1//view]
649 0 0 if (m[^/[^/]])
651 0 0 if ($p eq '/' and not -r $_) { }
0 0 elsif (-r $p) { }
662 0 0 if $$self{'WRAPPER'}
674 0 0 if (/^-c(omment)?$/) { }
0 0 elsif (/^-(nc|c[fq])/) { }
0 0 elsif ($c and $i == $c + 1) { }
679 0 0 if /\n/
684 0 0 if ($v)
703 0 0 /"/ ? :
0 0 /'/ ? :
0 0 /^$|\s|[\[\]\(\)*"'?]/ ? :
713 0 0 if $dbg
720 0 0 if (exists $$self{'IPC'}{'COMMENT'})
734 0 0 if (not $manok and /^(?:clear|multi)tool.*?: (Error|Warning):/) { }
0 0 elsif (not $man and /^Comments for /) { }
0 0 elsif (s/^(.*)Command \d+ returned status (\d+)/$1/) { }
0 0 elsif (not $manok and $man) { }
735 0 0 if ($stderr) { }
742 0 0 if ($disposition) { }
751 0 0 if /^\.$/
754 0 0 unless $rc
756 0 0 $_ ? :
760 0 0 if $_ and $dbg >= 2
761 0 0 if $diff and not /^Files are identical/
762 0 0 if $next
764 0 0 if ($stdout or $err and $stderr)
765 0 0 if ($disposition and $err && $stderr == 1 || !$err && $stdout == 1) { }
771 0 0 if $last
785 0 0 if ($style)
789 0 0 if ($self->ctcmd) { }
0 0 elsif ($self->ipc) { }
800 0 0 if ($self->readonly =~ /^a/i) { }
802 0 0 if ($cmd[-1] =~ /^(ls|annotate|apropos|cat|des|diff|dospace| file|getcache|getlog|help|host|man|pw| setview|space)/x) { }
822 0 0 if @_ == 2
823 0 0 if @_ > 2
825 0 0 if ($self->ipc)
829 0 0 if ($_[$i] eq '-c' and $_[$i + 1] =~ /\n/s)
842 0 0 if $inpathnorm
858 0 0 if ($self->ipc) { }
859 0 0 unless grep /^-cq/, @prev
862 0 0 unless grep /^-c/, @prev
878 0 0 if ($self->ipc)
879 0 0 ref $self ? :
897 0 0 if ($self->ipc)
899 0 0 if ($proto->ipc and $$self{'IPC'}{'PID'} == $$proto{'IPC'}{'PID'})
906 0 0 ref $proto ? :
915 0 0 if $self->ipc