Condition Coverage

blib/lib/Data/SeaBASS.pm
Criterion Covered Total %
condition 139 204 68.1


and 3 conditions

line !l l&&!r l&&r condition
617 2509 77 2 $strict and not $_ =~ m[^/]
630 0 1 0 $strict and not $_ =~ m[^/]
856 73 285 73 $self->{'options'}{'cache'} and $self->{'dataidx'} < $self->{'max_dataidx'}
1059 1 10 3 $index <= $self->{'dataidx'} and $index != INSERT_END()
1106 3 2 0 not defined $index and $self->{'dataidx'} < 0
1192 5 2 12 defined $ret and defined wantarray
1259 2 20 14 defined $row->{$field} and !defined($missing) || $row->{$field} != $missing
1507 65 0 0 &firstidx(sub { $_ eq $header_no_slash; } , @ALL_HEADERS) < 0 and &firstidx(sub { $_ eq $header_no_slash; } , @HIDDEN_HEADERS) < 0
1525 0 14 0 not $write_to_h and exists $self->{'default_write_to'}
1570 12 0 1 $add_missing_headers and $add_missing_headers eq '1'
1580 1 0 5 $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1583 1 0 5 $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1603 2 10 1 not @{$self->{'comments'};} and $add_missing_headers
1738 67 127 774 $self->{'missing_is_number'} and &looks_like_number($v)
194 706 68 $self->{'missing_is_number'} and &looks_like_number($v) and $v == $self->{'missing'}
20 869 11 not $self->{'options'}{'preserve_detection_limits'} and $self->{'adl_is_number'}
869 2 9 not $self->{'options'}{'preserve_detection_limits'} and $self->{'adl_is_number'} and &looks_like_number($v)
871 8 1 not $self->{'options'}{'preserve_detection_limits'} and $self->{'adl_is_number'} and &looks_like_number($v) and $v == $self->{'above_detection_limit'}
20 868 11 not $self->{'options'}{'preserve_detection_limits'} and $self->{'bdl_is_number'}
868 2 9 not $self->{'options'}{'preserve_detection_limits'} and $self->{'bdl_is_number'} and &looks_like_number($v)
870 8 1 not $self->{'options'}{'preserve_detection_limits'} and $self->{'bdl_is_number'} and &looks_like_number($v) and $v == $self->{'below_detection_limit'}
20 868 0 not $self->{'options'}{'preserve_detection_limits'} and $v eq $self->{'below_detection_limit'} || $v eq $self->{'above_detection_limit'}
1826 0 4 133 ref $value eq 'ARRAY' and wantarray
4 0 0 ref $value eq 'HASH' and wantarray
2039 72 0 0 &firstidx(sub { $_ eq $header; } , @ALL_HEADERS) < 0 and &firstidx(sub { $_ eq $header; } , @HIDDEN_HEADERS) < 0
2169 1 127 1 $self->{'options'}{'optional_warnings'} and $headers{$data_use_header}
2211 2387 207 1 length $v == 0 and not $k =~ /_header/
2229 133 6 0 $strict and &firstidx(sub { "/$_" eq $k; } , @ALL_HEADERS) < 0
139 0 0 $strict and &firstidx(sub { "/$_" eq $k; } , @ALL_HEADERS) < 0 and &firstidx(sub { "/$_" eq $k; } , @HIDDEN_HEADERS) < 0
2238 2376 80 0 $strict and &firstidx(sub { $_ eq $k; } , @ALL_HEADERS) < 0
2456 0 0 $strict and &firstidx(sub { $_ eq $k; } , @ALL_HEADERS) < 0 and &firstidx(sub { $_ eq $k; } , @HIDDEN_HEADERS) < 0
2311 0 24 4 $self->{'options'}{'cache'} and $self->{'max_dataidx'} >= 0
2340 21 0 0 $self->{'options'}{'fill_ancillary_data'} and &firstidx(sub { $_ eq $field; } , keys %{$$self{'ancillary'};}) >= 0
2350 1903 0 50 defined $v and length $v
1903 50 0 defined $v and length $v and !defined($missing) || $v != $missing
2351 268 0 11 defined $v and length $v
268 6 5 defined $v and length $v and !defined($missing) || $v != $missing
2545 158 0 20 defined $self->{'headers'}{"$slash$where"} and $self->{'headers'}{"$slash$where"} =~ /$regex/
158 0 20 defined $self->{'headers'}{"$slash$where"} and $self->{'headers'}{"$slash$where"} =~ /$regex/ and lc $1 ne 'na'
2640 0 0 104 defined $row->{$variable} and length $row->{$variable}
0 104 0 defined $row->{$variable} and length $row->{$variable} and !defined($missing) || $row->{$variable} != $missing

or 2 conditions

line l !l condition
1345 14 7 $unit ||= 'unitless'
1543 14 0 $self->{'headers'}{"${slash}delimiter"} ||= 'comma'
1574 1 0 $add_missing_headers || ''
2058 132 1 $headers{"${slash}fields"} || ''
2059 132 1 $headers{"${slash}fields"} || ''
2281 93 0 shift() || ''

or 3 conditions

line l !l&&r !l&&!r condition
1247 3 0 1 not $self->{'options'}{'fill_ancillary_data'} or &firstidx(sub { $_ eq $field; } , keys %{$$self{'ancillary'};}) < 0
1259 18 14 2 !defined($missing) || $row->{$field} != $missing
1526 0 0 0 $write_to_h ||= $self->{'default_write_to'}
1580 7 5 1 $missing eq $adl or $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1583 7 5 1 $missing eq $bdl or $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1631 0 25 0 $HEADER_DEFAULTS{$header} || $add_missing_headers
1643 0 0 0 $HEADER_DEFAULTS{$header} || $add_missing_headers
1722 235 33 0 $self->{'delim'} or $self->guess_delim($line)
1726 0 268 0 $field_list ||= $self->{'fields'}
1738 0 0 868 $v eq $self->{'below_detection_limit'} || $v eq $self->{'above_detection_limit'}
10 0 888 $v eq $self->{'missing'} or not $self->{'options'}{'preserve_detection_limits'} and $v eq $self->{'below_detection_limit'} || $v eq $self->{'above_detection_limit'}
2016 114 19 0 $headers{"${slash}missing"} || $DEFAULT_MISSING
2022 0 7 21 not defined $v or $v =~ m(^n/?a(?:\[.*?\])?$)i
7 0 21 not defined $v or $v =~ m(^n/?a(?:\[.*?\])?$)i or lc $v eq lc $missing
2044 0 0 5 $headers{"${slash}begin_header"} or $headers{"${slash}end_header"}
2098 7 122 0 $headers{"${slash}below_detection_limit"} || $missing
2099 7 122 0 $headers{"${slash}above_detection_limit"} || $missing
2220 1190 123 1282 not $self->{'options'}{'preserve_case'} or $k =~ /fields|units/
2348 0 2232 0 $self->{'case_conversion'}{$variable} || $variable
2350 28 22 0 !defined($missing) || $v != $missing
2351 6 5 0 !defined($missing) || $v != $missing
2454 3 4 0 $self->{'delim'} or $self->guess_delim($_[0])
2640 69 35 0 !defined($missing) || $row->{$variable} != $missing