Condition Coverage

blib/lib/Spreadsheet/Edit.pm
Criterion Covered Total %
condition 74 346 21.3


and 3 conditions

line !l l&&!r l&&r condition
235 0 0 3 defined &Carp::CALLER_OVERRIDE_CHECK_OK && &Carp::CALLER_OVERRIDE_CHECK_OK
264 4 0 0 @_ == 1 && ref $_[0] eq 'HASH'
351 0 0 0 $llen > $indent and $llen + length($_) > $foldwidth
380 0 0 0 index($colspec, $left) < 0 and index($colspec, $right) < 0
467 14 0 0 $title =~ /^[1-9]\d*$/u || $title eq '0' and $title <= $num_cols
522 0 0 2 defined $userpkg and $userpkg =~ /^[a-zA-Z][:\w]*$/a
583 7 70 208 @_ > 0 and ref $_[0]
584 0 0 184 ref $_[0] eq "ARRAY" and @{$_[0];} <= 2
0 0 184 ref $_[0] eq "ARRAY" and @{$_[0];} <= 2 and ref($_[0][0]) . "" =~ /^Spreadsheet::Edit\b/u
606 73 121 80 defined $rx and $rx < 0 || $rx > $#{$sheet->rows;}
728 10 0 1110 defined &blessed($_[0]) and $_[0]->isa("Spreadsheet::Edit")
10 0 1110 defined &blessed($_[0]) and $_[0]->isa("Spreadsheet::Edit") and shift @_
800 0 1 0 $opts{"undef_ok_only"} and not defined $$opthash{$k}
1 0 0 $opts{"undef_ok_only"} and not defined $$opthash{$k} and not grep({$_ eq $k;} @{$opts{"undef_ok_only"};})
848 0 0 4 defined $_[0] and "$_[0]" =~ /^\d+$/u
920 0 0 4 defined $classname and $classname =~ /^[\w_:]+$/u
1032 0 0 6 ref $linenums eq "ARRAY" and &all(sub {
1037 4 0 0 $num_cols and $num_cols != $nc
1105 0 3 0 @_ > 0 and %$tiedvarnames
1319 0 0 0 exists $${$self;}{"input_iolayers"} and $${$self;}{"input_iolayers"} =~ /encoding\(([^()]*)\)/u
1366 0 0 9 &blessed($sheet) && $sheet->isa('Spreadsheet::Edit')
3 9 0 defined $sheet and not &blessed($sheet) && $sheet->isa('Spreadsheet::Edit')
1468 1 0 1 $rx <= $#$rows and !defined($rxlast) || $rx <= $rxlast
1481 6 0 0 defined $$hash{"current_rx"} and $$hash{"current_rx"} > $#$rows
1635 0 0 0 $spec =~ /^[1-9]\d*$/u || $spec eq '0' and $spec <= $num_cols
1754 0 0 0 $$opthash{"optional"} and $@ =~ /does not match/isu
1901 1 0 0 $debug and @nd_reasons
2032 0 0 0 defined $title_rx and $row == $$rows[$title_rx]
2284 0 0 5 @$result > 0 and not grep({$_ eq "" unless ref $_;} @$result)
2478 0 0 0 defined $title_rx and $rx <= $title_rx
2671 0 0 0 $dest =~ /\.([a-z]*)$/u and lc $1 ne "csv"
2715 0 0 0 $csvopts{'escape_char'} ne '' && $csvopts{'escape_char'} ne "\000"
2738 0 0 0 $csvopts{"sep_char"} ne "" and $csvopts{"sep_char"} ne "\0"
0 0 0 $csvopts{"sep_char"} ne "" and $csvopts{"sep_char"} ne "\0" and $value =~ /\Q$csvopts{"sep_char"}\E/d
0 0 0 $csvopts{"escape_char"} ne "" and $csvopts{"escape_char"} ne "\0"
0 0 0 $csvopts{"escape_char"} ne "" and $csvopts{"escape_char"} ne "\0" and $value =~ /\Q$csvopts{"escape_char"}\E/d
0 0 0 $csvopts{"quote_binary"} and $value =~ /[\x00-\x1f\x7f-\xa0]/d
0 0 0 $csvopts{"quote_space"} and $value =~ /[\x09\x20]/d
2817 0 0 0 defined $pkg and $pkg->isa("Data::Dumper")
2920 0 0 47 $index >= 0 and $index <= $#$aref
2927 0 0 12 $index >= 0 and $index <= $#$aref + 1

or 2 conditions

line l !l condition
346 0 0 $indent //= 4
347 0 0 $foldwidth //= 72
612 0 274 $sheet->attributes->{"logmsg_pfx_gen"} // \&Spreadsheet::Edit::_default_pfx_gen
797 0 0 $opts{"desc"} // "option"
842 0 0 $optdesc // "option"
848 0 0 $_[1] // "argument"
854 0 0 $_[1] // "argument"
877 0 0 $rx // ""
928 0 4 delete $$opthash{"cmd_nesting"} // 0
952 0 4 delete $opts{"attributes"} // {}
0 4 delete $opts{"linenums"} // []
0 4 delete $opts{"meta_info"} // []
1048 6 6 $_ //= "???"
1053 0 2 $$hash{"num_cols"} //= 0
1078 0 0 $$$self{"pkg2tiedvarnames"}{$pkg} //= {}
1103 0 3 $$$self{"pkg2tiedvarnames"}{$pkg} //= {}
1338 0 0 $$$self{"current_rx"} // (return undef)
1383 0 0 $$$self{'cmd_nesting'} || 1
1393 0 0 $sheet->sheetname || $sheet->data_source || 'no data_source'
1468 1 0 $rxfirst // 0
1871 0 1 $$opthash{"min_rx"} // 0
1875 0 1 $$opthash{"first_cx"} // 0
1876 0 1 $$opthash{"last_cx"} // 2147483647
2012 0 0 $_ // ""
2211 0 0 $$hash{"title_rx"} // -1
2260 1 0 $$hash{"title_rx"} // -1
2384 0 0 $$row[$ocx] // ""
2395 0 0 $$$self{"data_source"} //= ""
2465 0 0 $rx //= "END"
2466 0 0 $count //= 1
2535 0 0 $$opthash{"iolayers"} // ""
2539 0 2 $$$self{"iolayers"} // ""
2645 0 0 $$$self{"iolayers"} // ""
2649 0 0 $self->input_encoding || 'UTF-8'
2816 0 0 (caller $lvl)[0] || (last)

or 3 conditions

line l !l&&r !l&&!r condition
351 0 0 0 $_ eq "\n" or $llen > $indent and $llen + length($_) > $foldwidth
467 0 0 14 $title =~ /^[1-9]\d*$/u || $title eq '0'
0 0 14 $title eq "" or $title eq "^"
0 0 14 $title eq "" or $title eq "^" or $title eq "\$"
482 6 0 0 $title_rx // &oops()
525 2 0 0 $opts{"data_source"} ||= "Created at ${fn}:$lno by $subname"
606 40 40 121 $rx < 0 || $rx > $#{$sheet->rows;}
854 0 0 0 not defined $_[0] or "$_[0]" =~ /^\d+$/u
895 0 0 0 $wantarray or not defined $wantarray
941 0 0 0 delete $opts{"data_source"} // qq[cloned from $$$self{"data_source"}]
1032 6 0 0 &looks_like_number($_) or not /[^\?]/u
1077 0 0 0 $$opts{"package"} // &__callerpkg()
1210 2 0 0 $pkg2currsheet{$pkg} // croak("No sheet is currently valid for package $pkg\n")
1240 0 0 3 $$opts{"silent"} // $$$self{"silent"}
1241 0 0 3 $$opts{"verbose"} // $$$self{"verbose"}
1242 0 0 3 $$opts{"debug"} // $$$self{"debug"}
1244 2 1 0 $$opts{"package"} // &__callerpkg()
1344 0 0 0 $rx < 0 or $rx > $#$rows
1347 0 0 0 not defined $cx or $cx < 0
0 0 0 not defined $cx or $cx < 0 or $cx > $#$row
1448 0 0 0 $_ < 0 or $_ >= $num_cols
1461 0 0 5 $rx < 0 or $rx > $#$rows
1468 0 1 0 !defined($rxlast) || $rx <= $rxlast
1635 0 0 0 $spec =~ /^[1-9]\d*$/u || $spec eq '0'
1648 0 0 0 $$rows[$title_rx] // &oops()
1780 0 0 0 delete $$useraliases{$_} // croak("unalias: '${_}' is not a column alias\n")
1782 0 0 0 delete $$colx{$_} // &oops()
1783 0 0 0 delete $$colx_desc{$_} // &oops()
1872 0 1 0 $$opthash{"max_rx"} // $min_rx + 3
2057 0 0 0 $first_rx //= defined $title_rx ? $title_rx + 1 : 0
2058 0 0 0 $last_rx //= $#$rows
2318 0 0 0 $_ < 0 or $_ > $max_rx
2539 0 0 2 $$opthash{"iolayers"} //= $$$self{"iolayers"} // ""
2552 0 0 2 $$$self{'verbose'} || $$$self{'debug'}
2564 0 0 2 $$$self{"iolayers"} //= $$hash{"iolayers"}
2645 0 0 0 $$opts{"iolayers"} //= $$$self{"iolayers"} // ""
2726 0 0 0 $csvopts{'always_quote'} || ($mi // 0) & 1
2738 0 0 0 $value =~ /\Q$csvopts{"quote_char"}\E/d or $csvopts{"sep_char"} ne "" and $csvopts{"sep_char"} ne "\0" and $value =~ /\Q$csvopts{"sep_char"}\E/d
0 0 0 $value =~ /\Q$csvopts{"quote_char"}\E/d or $csvopts{"sep_char"} ne "" and $csvopts{"sep_char"} ne "\0" and $value =~ /\Q$csvopts{"sep_char"}\E/d or $csvopts{"escape_char"} ne "" and $csvopts{"escape_char"} ne "\0" and $value =~ /\Q$csvopts{"escape_char"}\E/d
0 0 0 $value =~ /\Q$csvopts{"quote_char"}\E/d or $csvopts{"sep_char"} ne "" and $csvopts{"sep_char"} ne "\0" and $value =~ /\Q$csvopts{"sep_char"}\E/d or $csvopts{"escape_char"} ne "" and $csvopts{"escape_char"} ne "\0" and $value =~ /\Q$csvopts{"escape_char"}\E/d or $csvopts{"quote_binary"} and $value =~ /[\x00-\x1f\x7f-\xa0]/d
0 0 0 $value =~ /\Q$csvopts{"quote_char"}\E/d or $csvopts{"sep_char"} ne "" and $csvopts{"sep_char"} ne "\0" and $value =~ /\Q$csvopts{"sep_char"}\E/d or $csvopts{"escape_char"} ne "" and $csvopts{"escape_char"} ne "\0" and $value =~ /\Q$csvopts{"escape_char"}\E/d or $csvopts{"quote_binary"} and $value =~ /[\x00-\x1f\x7f-\xa0]/d or $csvopts{"quote_space"} and $value =~ /[\x09\x20]/d
2774 0 0 0 $$opts{"col_formats"} // croak("{col_formats} is required")
2779 0 0 0 $$colx{$key} // croak("Invalid COLSPEC '${key}' in col_formats")
2795 0 0 0 $$opts{"sheetname"} //= fileparse($outpath, qr/\.\w+/u)
2843 0 0 0 $$$sheet{$array_ident} // &oops(&dvisq("\$array_ident \@_"))
2844 0 0 0 $$$sheet{$index_ident} // do {
2845 0 0 0 $index_ident eq "current_rx" or $index_ident eq "title_rx"
2867 2 12 0 $$opthash{"package"} // caller()
2871 0 0 14 $$opthash{'verbose'} || $curr && $$$curr{'verbose'}
2877 0 0 9 $verbose ||= $$$new{"verbose"}
2999 4 0 0 $cx <= $#{$cells;} // croak("BUG?? key '${key}' maps to cx $cx which is out of range!")