Branch Coverage

blib/lib/Clearquest.pm
Criterion Covered Total %
branch 47 360 13.0


line true false branch
259 1 0 if ($self->{'errmsg'} eq '') { }
261 1 0 $self->{'errmsg'} eq '' ? :
276 0 0 if $year % 4
277 0 0 if $year % 100
278 0 0 if $year % 400
296 0 0 &_is_leap_year($i) ? :
303 0 0 if &_is_leap_year($year) and $month > 2
324 0 0 &_is_leap_year($year) ? :
327 0 0 if $amount > $epoch
333 0 0 &_is_leap_year($year) ? :
335 0 0 if ($epoch >= (334 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (304 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (273 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (243 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (212 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (181 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (151 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (120 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (90 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= (59 + $leapYearAdjustment) * $SECS_IN_DAY) { }
0 0 elsif ($epoch >= 31 * $SECS_IN_DAY) { }
379 0 0 if $day < 10
380 0 0 if $hour < 10
381 0 0 if $minute < 10
382 0 0 if $seconds < 10
393 0 0 if ($condition =~ /$operatorRE/) { }
398 0 0 if ($operator eq '==' or $operator eq '=') { }
0 0 elsif ($operator eq '!=' or $operator eq '<>') { }
0 0 elsif ($operator eq '<') { }
0 0 elsif ($operator eq '>') { }
0 0 elsif ($operator eq '<=') { }
0 0 elsif ($operator eq '>=') { }
0 0 elsif ($operator =~ /^like$/i) { }
0 0 elsif ($operator =~ /^not\s+like$/i) { }
0 0 elsif ($operator =~ /^between$/i) { }
0 0 elsif ($operator =~ /^not\s+between$/i) { }
0 0 elsif ($operator =~ /^is\s+null$/i) { }
0 0 elsif ($operator =~ /^is\s+not\s+null$/i) { }
0 0 elsif ($operator =~ /^in$/i) { }
0 0 elsif ($operator =~ /^not\s+in$/) { }
399 0 0 if (not $value =~ /^null$/i) { }
405 0 0 if (not $value =~ /^null$/i) { }
453 0 0 if ($value =~ /^\s*\'/) { }
0 0 elsif ($value =~ /^\s*\"/) { }
473 0 0 if $condition eq ""
477 0 0 if ($condition =~ /(.+?)\s+(and|or)\s+(.+)/i) { }
482 0 0 if ($conjunction eq 'and') { }
0 0 elsif ($conjunction eq 'or') { }
483 0 0 if ($filterOperator) { }
491 0 0 if ($filterOperator) { }
504 0 0 unless ($condition =~ /$operatorRE/)
510 0 0 unless $filterOperator
525 0 0 unless $operator
527 0 0 if ($operator == $CQPerlExt::CQ_COMP_OP_IS_NULL or $operator == $CQPerlExt::CQ_COMP_OP_IS_NOT_NULL) { }
532 0 0 if ($@)
541 0 0 if ($operator == $CQPerlExt::CQ_COMP_OP_BETWEEN or $operator == $CQPerlExt::CQ_COMP_OP_NOT_BETWEEN or $operator == $CQPerlExt::CQ_COMP_OP_IN or $operator == $CQPerlExt::CQ_COMP_OP_NOT_IN) { }
550 0 0 if ($@)
558 0 0 if ($@)
576 0 2 if ($@)
582 1 1 unless (@fields)
584 5 0 unless ($self->{'returnSystemFields'})
585 0 5 if $entityDef->IsSystemOwnedFieldDefName($_)
593 1 1 unless grep {$_ eq "dbid";} @fields
603 1 4 if ($errmsg and $errmsg ne '') { }
623 0 3 if $entityDef->IsSystemOwnedFieldDefName($fieldName)
625 0 3 if (ref $fieldValue eq 'ARRAY') { }
630 3 0 if $fieldValue
635 0 0 unless $errmsg eq ""
645 0 0 unless $utcdatetime
648 0 0 unless $utcdatetime =~ /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/
721 0 1 unless ($self->connected)
732 0 1 if ($@)
740 0 0 if ($values{$_}) { }
748 0 0 unless $self->{'errmsg'} eq ""
751 0 1 unless $self->{'errmsg'} eq ""
755 0 3 if grep {$fieldName eq $_;} @ordering
760 0 3 unless $self->{'errmsg'} eq ""
765 0 1 unless $self->{'errmsg'} eq ""
768 1 0 $self->{'errmsg'} eq '' ? :
826 0 1 unless $self->{'module'} eq "api"
830 0 1 if $@
834 0 1 if $username
835 0 1 if $password
836 0 1 if $database
837 0 1 if $dbset
850 0 1 if ($@) { }
944 0 0 if ($fullyQualify) { }
947 0 0 unless $self->dbset eq $DEFAULT_DBSET
1000 0 0 if ($self->{'error'})
1001 0 0 if ($msg) { }
1007 0 0 if ($die) { }
1008 0 0 if $log
1011 0 0 if ($log) { }
1137 0 0 unless ($self->connected)
1194 0 0 if ($@)
1202 0 0 if ($@)
1214 0 1 if $self->{'session'}
1300 0 0 if $errmsg
1346 5 0 if defined $error
1394 0 0 unless $self->{'loggedin'}
1398 0 0 if ($FIELDS{$table})
1401 0 0 if (defined $FIELDS{$table}{$fieldName}) { }
1414 0 0 if (defined $FIELDS{$table}{$fieldName}) { }
1466 0 0 unless $fieldType
1468 0 0 if ($fieldType == $STRING) { }
0 0 elsif ($fieldType == $MULTILINE_STRING) { }
0 0 elsif ($fieldType == $INT) { }
0 0 elsif ($fieldType == $DATE_TIME) { }
0 0 elsif ($fieldType == $REFERENCE) { }
0 0 elsif ($fieldType == $REFERENCE_LIST) { }
0 0 elsif ($fieldType == $ATTACHMENT_LIST) { }
0 0 elsif ($fieldType == $ID) { }
0 0 elsif ($fieldType == $STATE) { }
0 0 elsif ($fieldType == $JOURNAL) { }
0 0 elsif ($fieldType == $DBID) { }
0 0 elsif ($fieldType == $STATETYPE) { }
0 0 elsif ($fieldType == $RECORD_TYPE) { }
0 0 elsif ($fieldType == $UNKNOWN) { }
1596 0 0 unless ($self->connected)
1607 0 0 if ($@)
1615 0 0 unless @fields
1622 0 0 if ($@)
1631 0 0 if $self->error
1640 0 0 if (wantarray) { }
1689 0 0 if ref $str eq "ARRAY"
1697 0 0 if (wantarray) { }
1747 0 2 unless ($self->connected)
1756 0 2 unless @fields
1762 0 2 if ($@)
1773 0 7 if ($fieldType == $CQPerlExt::CQ_REFERENCE_LIST) { }
1777 0 7 if $self->{'emptyStringForUndef'}
1780 0 7 if ($fieldType == $CQPerlExt::CQ_DATE_TIME)
1841 0 0 unless ($self->connected)
1854 0 0 if ($@)
1865 0 0 if ($fieldType == $CQPerlExt::CQ_REFERENCE_LIST) { }
1869 0 0 if $self->{'emptyStringForUndef'}
1872 0 0 if ($fieldType == $CQPerlExt::CQ_DATE_TIME)
1922 0 0 unless $self->connected
1966 0 0 unless ($self->connected)
1991 0 0 do { $result->{'lastDBID'} == $result->{'thisDBID'} } ? :
0 0 $result->{'lastDBID'} ? :
1994 0 0 unless $result->{'result'}->MoveNext == $CQPerlExt::CQ_SUCCESS
1999 0 0 unless $result->{'result'}->MoveNext == $CQPerlExt::CQ_SUCCESS
2020 0 0 if $value
2022 0 0 if $self->{'emptyStringForUndef'}
2027 0 0 unless $result->{'lastRecord'}
2032 0 0 if ($result->{'lastDBID'})
2033 0 0 if ($result->{'thisDBID'} == $result->{'lastDBID'}) { }
2040 0 0 if $record{$field} eq ""
2044 0 0 if (ref \$result->{'lastRecord'}{$field} eq "ARRAY")
2047 0 0 if grep {/^$record{$field}$/;} @{$$result{"lastRecord"}{$field};}
2052 0 0 if (ref \$result->{'lastRecord'}{$field} eq 'SCALAR') { }
2056 0 0 if $result->{'lastRecord'}{$field} eq $record{$field}
2066 0 0 unless grep {/^$record{$field}$/;} @{$$result{"lastRecord"}{$field};}
2133 0 0 if ($ID =~ /([A-Za-z]\w{1,4})\d{8}/) { }
2181 0 0 unless ($self->connected)
2262 0 1 unless ($self->connected)
2330 1 0 if $values
2336 0 1 if ($@)
2344 1 0 if ($@)
2352 0 0 if ($values{$_}) { }
2359 0 0 unless $self->{'errmsg'} eq ""
2362 0 0 unless $self->{'errmsg'} eq ""
2366 0 0 if grep {$fieldName eq $_;} @ordering
2371 0 0 unless $self->{'errmsg'} eq ""
2376 0 0 unless $self->{'errmsg'} eq ""
2379 0 0 $self->{'errmsg'} eq '' ? :
2504 0 1 if ($module eq 'rest') { }
0 1 elsif ($module eq 'client') { }
0 1 elsif ($module ne 'api') { }
2620 0 0 if $opts{'emptyStringForUndef'}
2622 0 0 if $opts{'returnSystemFields'}
2666 0 0 if (grep {$option eq $_;} @validOpts) { }
2726 0 0 if (exists $opts{$var}) { }
0 0 elsif (exists $ENV{$var}) { }
2746 0 12 if /^\s*[\#|\!]/
2748 12 0 if (/\s*(.*?)\s*[:=]\s*(.*)\s*/)
2758 0 12 if ($opts{$key}) { }
2763 0 0 if (ref $opts{$key} eq 'ARRAY') { }
2792 0 2 unless open my $configFile, "<", $filename