Branch Coverage

blib/lib/P4/Getopt.pm
Criterion Covered Total %
branch 65 118 55.0


line true false branch
120 0 1 unless @_ >= 1
151 1 0 if $P4::Getopt::Debug
152 0 1 unless my $fh = 'IO::File'->new($filename)
157 8 1 if $line =~ /^\s*$/
172 0 18 if $param =~ /^\s*$/
173 18 0 if $P4::Getopt::Debug
174 2 16 if ($$self{'_parameter_unknown'})
179 7 9 if ($param eq '-c' or $param eq '-d' or $param eq '-H' or $param eq '-p' or $param eq '-P' or $param eq '-u' or $param eq '-C' or $param eq '-x') { }
1 8 elsif ($param eq '-s') { }
0 8 elsif ($param eq '-n') { }
7 1 elsif ($$self{'_parameter_next'}) { }
1 0 elsif (not $param =~ /^-/) { }
199 1 6 if ($pn eq '-x') { }
1 5 elsif ($pn eq '-c') { }
1 4 elsif ($pn eq '-d') { }
1 3 elsif ($pn eq '-H') { }
1 2 elsif ($pn eq '-p') { }
1 1 elsif ($pn eq '-P') { }
1 0 elsif ($pn eq '-u') { }
0 0 elsif ($pn eq '-C') { }
249 1 0 if _param_changed($self, 'client')
250 1 0 if _param_changed($self, 'pwd')
251 1 0 if _param_changed($self, 'host')
252 1 0 if _param_changed($self, 'port')
253 1 0 if _param_changed($self, 'password')
254 1 0 if _param_changed($self, 'script')
255 1 0 if _param_changed($self, 'user')
256 0 1 if _param_changed($self, 'charset')
265 0 0 unless my $client = shift()
267 0 0 if $self->client and $P4::Getopt::Debug
268 0 0 if $self->port and $P4::Getopt::Debug
269 0 0 if $self->password and $P4::Getopt::Debug
271 0 0 if $self->client
272 0 0 if $self->port
273 0 0 if $self->password
285 1 0 if $P4::Getopt::Debug
291 3 3 if ($tempElement =~ s/^\[(-\S+)\]//) { }
1 2 elsif ($tempElement =~ s/^\[(-\S+)\s+(\S+)\]//) { }
0 2 elsif ($tempElement =~ s/^\[(\S+)\.\.\.\]//) { }
2 0 elsif ($tempElement =~ s/^\[(\S+)\]//) { }
0 0 elsif ($tempElement =~ s/^(\S+)\.\.\.//) { }
0 0 elsif ($tempElement =~ s/^(\S+)//) { }
318 1 3 if ($arg =~ /^-/ and $parser{$arg}) { }
0 3 elsif ($arg =~ /^-/ and $parser{$argone}) { }
325 1 2 if ($inSwitch) { }
2 0 elsif ($parser{$paramNum}) { }
330 2 0 unless $parser{$paramNum}{'more'}
348 1 3 if ($cmdParsed[$i] eq 'switch') { }
351 3 0 if (not ref $hashed{$cmdParsed[$i]}) { }
367 0 0 unless $par eq $switch
378 7 0 if (exists $$self{$func}) { }
379 0 7 unless eval "sub $func { \$_[0]->{'${func}'} = \$_[1] if defined \$_[1]; return \$_[0]->{'${func}'}; }; 1;"
1 0 if defined $_[1]
2 1 if defined $_[1]
1 0 if defined $_[1]
1 0 if defined $_[1]
1 0 if defined $_[1]
1 0 if defined $_[1]
1 0 if defined $_[1]