Condition Coverage

blib/lib/Spreadsheet/Read.pm
Criterion Covered Total %
condition 183 315 58.1


and 3 conditions

line !l l&&!r l&&r condition
222 1 3 15735 defined $c and $c > 0
238 1 1 15535 defined $c and defined $r
2 3 15532 defined $c and defined $r and $c > 0
4 1 15531 defined $c and defined $r and $c > 0 and $r > 0
257 0 2 7 ref $sheet eq 'HASH' and exists $sheet->{'cell'}
258 0 0 7 exists $sheet->{'maxcol'} and exists $sheet->{'maxrow'}
260 1 1 4 $row > 0 and $row <= $sheet->{'maxrow'}
269 0 2 7 ref $sheet eq 'HASH' and exists $sheet->{'cell'}
270 0 0 7 exists $sheet->{'maxcol'} and exists $sheet->{'maxrow'}
272 1 1 4 $row > 0 and $row <= $sheet->{'maxrow'}
280 3 1 26 ref $sheet eq 'HASH' and exists $sheet->{'cell'}
281 14 7 5 exists $sheet->{'maxcol'} and exists $sheet->{'maxrow'}
292 1 1 22 $book and $sheet
295 5 0 17 $sheet =~ /^[0-9]+$/ and $sheet >= 1
5 1 16 $sheet =~ /^[0-9]+$/ and $sheet >= 1 and $sheet <= $book->[0]{'sheets'}
320 7 0 248 $ss->{'maxrow'} and $ss->{'maxcol'}
346 33 215 0 $oc and $mc < $ss->{'maxcol'} || $mr < $ss->{'maxrow'}
407 216 434 892 $p == 0 and not defined $bg
445 51 215 11 $io_fil and not -s $txt
446 246 15 5 $io_ref and eof $txt
448 29 121 84 $io_fil && $txt =~ /\.(csv)$/i
487 84 3 7 defined $opt{'quote'} and defined $opt{'sep'}
557 0 25 3 not $io_ref and $txt =~ /\.xls[xm]?$/i
621 74 0 72 $io_fil && $txt =~ /\.(xls[xm]?)$/i && ($_parser = _parser($1))
687 76 0 0 $parse_type eq 'ODS' and not exists $oBook->{'SheetCount'}
690 0 0 0 $sheets and ref $sheets eq 'ARRAY'
749 24 92 6 $opt{'clip'} and not defined $oWkS->{'Cells'}
815 0 1818 0 defined $val and my $enc = $oWkC->{'Code'}
855 230 132 8 defined $fmt and $fmt =~ m[^[dmy][-\\/dmy]*$]
859 208 41 99 defined $fmt and $fmt =~ /^0+\.0+%$/
864 0 1787 5 $FmT && exists $def_fmt{$FmT->{'FmtIdx'}}
899 1526 10 6 $opt{'merge'} and $merged
1536 0 6 $opt{'merge'} and $merged and my $p_cell = Spreadsheet::Read::Sheet::merged_from(\%sheet, $c + 1, $r + 1)
928 74 0 0 $io_fil && $txt =~ /(ods)$/i && ($_parser = _parser($1))
51 0 0 $opt{'parser'} ? $_parser =~ /^(ods)$/ : $io_fil && $txt =~ /(ods)$/i && ($_parser = _parser($1)) and not +($can{$_parser} || '') =~ /sxc/i
971 0 0 0 $opt{'clip'} and $oWkS->row_max < $oWkS->row_min
0 0 0 $opt{'clip'} and $oWkS->row_max < $oWkS->row_min and $oWkS->col_max < $oWkS->col_min
1025 0 0 0 $styleName and defined(my $s = $oBook->_styles->{$styleName})
1069 0 0 0 $opt{'merge'} and $merged
0 0 0 $opt{'merge'} and $merged and my $p_cell = Spreadsheet::Read::Sheet::merged_from(\%sheet, $c + 1, $r + 1)
1164 0 0 0 ref $txt and $can{'sxc'}->VERSION <= 0.23
1170 0 0 0 not $txt =~ /^<\?xml/i and -f $txt
1193 0 0 0 not $sxc and $txt =~ /^<\?xml/i
1255 9 9 5 not ref $txt and $txt =~ /\.\w+$/
1270 0 0 2 $book and ref $book eq 'ARRAY' || ref $book eq 'Spreadsheet::Read'
0 0 2 $book and ref $book eq 'ARRAY' || ref $book eq 'Spreadsheet::Read' and $book->[0]{'sheets'}
1282 0 0 2 $p->{'type'} eq $c2->{'type'} and $p->{'parser'} eq $c2->{'parser'}
1319 27 0 28 @id == 2 and $id[0] =~ /^[0-9]+$/
27 0 28 @id == 2 and $id[0] =~ /^[0-9]+$/ and $id[1] =~ /^[0-9]+$/
1321 0 0 27 @id and $id[0]
0 0 27 @id and $id[0] and exists $$sheet{$id[0]}
1328 14 0 12 @id == 2 and $id[0] =~ /^[0-9]+$/
14 0 12 @id == 2 and $id[0] =~ /^[0-9]+$/ and $id[1] =~ /^[0-9]+$/
1329 0 0 14 @id and $id[0]
0 0 14 @id and $id[0] and exists $$sheet{$id[0]}
1375 0 2 2 defined $row and $row > 0
2 1 1 defined $row and $row > 0 and $row <= $sheet->{'maxrow'}
1383 0 2 2 defined $row and $row > 0
2 1 1 defined $row and $row > 0 and $row <= $sheet->{'maxrow'}
1390 0 2 2 defined $col and $col > 0
2 1 1 defined $col and $col > 0 and $col <= $sheet->{'maxcol'}
1398 0 2 2 defined $col and $col > 0
2 1 1 defined $col and $col > 0 and $col <= $sheet->{'maxcol'}
1417 7 0 10 @id == 2 and $id[0] =~ /^[0-9]+$/
7 0 10 @id == 2 and $id[0] =~ /^[0-9]+$/ and $id[1] =~ /^[0-9]+$/
0 0 7 @id and $id[0]
0 4 3 @id and $id[0] and exists $$sheet{$id[0]}
1423 4 0 13 defined $row and $row > 0
4 1 12 defined $row and $row > 0 and $row <= $sheet->{'maxrow'}
1424 0 0 12 defined $col and $col > 0
0 0 12 defined $col and $col > 0 and $col <= $sheet->{'maxcol'}
1427 2 8 12 $col >= $ctl and $col <= $cbr
1428 2 0 10 $row >= $rtl and $row <= $rbr

or 2 conditions

line l !l condition
245 618 2 $_[0] or ''
669 76 0 $oBook->{'SheetCount'} || 0
691 0 0 +($styles || {})->{'styles'} || {}
733 0 0 $_->{'type'} || ''
795 0 111 $oWkS->{'RowHidden'} || []
796 0 111 $oWkS->{'ColHidden'} || []
872 20 1522 (defined $oWkC->{'Merged'} ? $oWkC->{'Merged'} : $oWkC->is_merged) || 0
897 3 1539 ($hiddenRows->[$r] || $hiddenCols->[$c] ? 1 : (defined $oWkC->{'Hidden'} ? $oWkC->{'Hidden'} : $FmT->{'Hidden'})) || 0
644 898 $FmT->{'Lock'} || 0
928 0 0 $can{$_parser} || ''
997 0 0 $oWkS->hidden_rows || []
998 0 0 $oWkS->hidden_cols || []
1039 0 0 $oWkC->type || ''
1042 0 0 $oWkC->is_merged || 0
1043 0 0 ($hiddenRows->[$r] || $hiddenCols->[$c] ? 1 : ($oWkC->is_hidden ? $oWkC->is_hidden : undef)) || 0

or 3 conditions

line l !l&&r !l&&!r condition
316 84 129 15 $os or $oc
346 106 0 109 $mc < $ss->{'maxcol'} || $mr < $ss->{'maxrow'}
373 1 0 0 $ss->{'maxrow'} or $ss->{'maxcol'}
398 0 382 484 $clr == 0 or $clr == 32767
409 0 434 0 $bg < 8 or $bg > 63
443 20 226 31 $io_ref || $io_fil
557 1 0 28 $txt =~ /\A(\376\067\0\043
1 0 28 $txt =~ /\A(\376\067\0\043
733 0 0 0 $_->{'value'} || $_->{'unformatted'}
0 0 0 $_->{'unformatted'} || $_->{'value'}
0 0 0 $$styles{$_->{'style'} or ''} || $_->{'style'}
744 0 0 73 $oBook->get_active_sheet || $oBook->{'ActiveSheet'} || $oBook->{'SelectedSheet'}
855 0 0 370 $FmT->{'FmtIdx'} == 14 or $FmT->{'FmtIdx'} == 15
0 0 370 $FmT->{'FmtIdx'} == 14 or $FmT->{'FmtIdx'} == 15 or $FmT->{'FmtIdx'} == 16
0 0 370 $FmT->{'FmtIdx'} == 14 or $FmT->{'FmtIdx'} == 15 or $FmT->{'FmtIdx'} == 16 or $FmT->{'FmtIdx'} == 17
0 0 370 $FmT->{'FmtIdx'} == 14 or $FmT->{'FmtIdx'} == 15 or $FmT->{'FmtIdx'} == 16 or $FmT->{'FmtIdx'} == 17 or $FmT->{'FmtIdx'} == 22
0 16 354 $FmT->{'FmtIdx'} == 14 or $FmT->{'FmtIdx'} == 15 or $FmT->{'FmtIdx'} == 16 or $FmT->{'FmtIdx'} == 17 or $FmT->{'FmtIdx'} == 22 or defined $fmt and $fmt =~ m[^[dmy][-\\/dmy]*$]
859 19 3 348 $FmT->{'FmtIdx'} == 9 or $FmT->{'FmtIdx'} == 10
22 160 188 $FmT->{'FmtIdx'} == 9 or $FmT->{'FmtIdx'} == 10 or defined $fmt and $fmt =~ /^0+\.0+%$/
1144 0 2714 828 /.* \{(.*)}$/ or /"(.*)"/
1160 0 7 23 $txt =~ /^<\?xml/ || -f $txt
1270 0 2 0 ref $book eq 'ARRAY' || ref $book eq 'Spreadsheet::Read'