Condition Coverage

blib/lib/SeaBASS/File.pm
Criterion Covered Total %
condition 125 180 69.4


and 3 conditions

line !l l&&!r l&&r condition
601 2480 77 2 $strict and not $_ =~ m[^/]
614 0 1 0 $strict and not $_ =~ m[^/]
840 73 283 73 $self->{'options'}{'cache'} and $self->{'dataidx'} < $self->{'max_dataidx'}
1043 1 10 3 $index <= $self->{'dataidx'} and $index != INSERT_END()
1090 3 2 0 not defined $index and $self->{'dataidx'} < 0
1176 5 2 12 defined $ret and defined wantarray
1243 2 20 14 defined $row->{$field} and !defined($missing) || $row->{$field} != $missing
1491 65 0 0 &firstidx(sub { $_ eq $header_no_slash; } , @ALL_HEADERS) < 0 and &firstidx(sub { $_ eq $header_no_slash; } , @HIDDEN_HEADERS) < 0
1509 0 14 0 not $write_to_h and exists $self->{'default_write_to'}
1554 12 0 1 $add_missing_headers and $add_missing_headers eq '1'
1564 1 0 5 $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1567 1 0 5 $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1587 2 10 1 not @{$self->{'comments'};} and $add_missing_headers
1716 57 127 774 $self->{'missing_is_number'} and &looks_like_number($v)
184 706 68 $self->{'missing_is_number'} and &looks_like_number($v) and $v == $self->{'missing'}
20 859 11 not $self->{'options'}{'preserve_detection_limits'} and $self->{'adl_is_number'}
859 2 9 not $self->{'options'}{'preserve_detection_limits'} and $self->{'adl_is_number'} and &looks_like_number($v)
861 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 858 11 not $self->{'options'}{'preserve_detection_limits'} and $self->{'bdl_is_number'}
858 2 9 not $self->{'options'}{'preserve_detection_limits'} and $self->{'bdl_is_number'} and &looks_like_number($v)
860 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 860 0 not $self->{'options'}{'preserve_detection_limits'} and $v eq $self->{'below_detection_limit'} || $v eq $self->{'above_detection_limit'}
1802 0 4 125 ref $value eq 'ARRAY' and wantarray
4 0 0 ref $value eq 'HASH' and wantarray
2015 72 0 0 &firstidx(sub { $_ eq $header; } , @ALL_HEADERS) < 0 and &firstidx(sub { $_ eq $header; } , @HIDDEN_HEADERS) < 0
2183 2365 201 0 length $v == 0 and not $k =~ /_header/
2201 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
2210 2347 80 0 $strict and &firstidx(sub { $_ eq $k; } , @ALL_HEADERS) < 0
2427 0 0 $strict and &firstidx(sub { $_ eq $k; } , @ALL_HEADERS) < 0 and &firstidx(sub { $_ eq $k; } , @HIDDEN_HEADERS) < 0
2283 0 24 4 $self->{'options'}{'cache'} and $self->{'max_dataidx'} >= 0
2312 21 0 0 $self->{'options'}{'fill_ancillary_data'} and &firstidx(sub { $_ eq $field; } , keys %{$$self{'ancillary'};}) >= 0
2321 2159 30 27 defined $hash->{$case_var} and !defined($missing) || $hash->{$case_var} != $missing
2508 150 0 12 defined $self->{'headers'}{"$slash$where"} and $self->{'headers'}{"$slash$where"} =~ /$regex/
150 0 12 defined $self->{'headers'}{"$slash$where"} and $self->{'headers'}{"$slash$where"} =~ /$regex/ and lc $1 ne 'na'
2603 0 98 0 defined $row->{$variable} and !defined($missing) || $row->{$variable} != $missing

or 2 conditions

line l !l condition
1329 14 7 $unit ||= 'unitless'
1527 14 0 $self->{'headers'}{"${slash}delimiter"} ||= 'comma'
1558 1 0 $add_missing_headers || ''
2034 127 1 $headers{"${slash}fields"} || ''
2035 127 1 $headers{"${slash}fields"} || ''
2253 90 0 shift() || ''

or 3 conditions

line l !l&&r !l&&!r condition
1231 3 0 1 not $self->{'options'}{'fill_ancillary_data'} or &firstidx(sub { $_ eq $field; } , keys %{$$self{'ancillary'};}) < 0
1243 18 14 2 !defined($missing) || $row->{$field} != $missing
1510 0 0 0 $write_to_h ||= $self->{'default_write_to'}
1564 7 5 1 $missing eq $adl or $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1567 7 5 1 $missing eq $bdl or $self->{'options'}{'missing_data_to_undef'} and not $self->{'options'}{'preserve_detection_limits'}
1700 235 31 0 $self->{'delim'} or $self->guess_delim($line)
1704 0 266 0 $field_list ||= $self->{'fields'}
1716 0 0 860 $v eq $self->{'below_detection_limit'} || $v eq $self->{'above_detection_limit'}
8 0 880 $v eq $self->{'missing'} or not $self->{'options'}{'preserve_detection_limits'} and $v eq $self->{'below_detection_limit'} || $v eq $self->{'above_detection_limit'}
1992 111 17 0 $headers{"${slash}missing"} || $DEFAULT_MISSING
1998 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
2020 0 0 5 $headers{"${slash}begin_header"} or $headers{"${slash}end_header"}
2074 4 120 0 $headers{"${slash}below_detection_limit"} || $missing
2075 4 120 0 $headers{"${slash}above_detection_limit"} || $missing
2192 1190 118 1258 not $self->{'options'}{'preserve_case'} or $k =~ /fields|units/
2320 0 2216 0 $self->{'case_conversion'}{$variable} || $variable
2321 30 27 0 !defined($missing) || $hash->{$case_var} != $missing
2417 3 4 0 $self->{'delim'} or $self->guess_delim($_[0])
2603 63 35 0 !defined($missing) || $row->{$variable} != $missing