Branch Coverage

blib/lib/AnyData.pm
Criterion Covered Total %
branch 101 246 41.0


line true false branch
25 1 11 if $format eq 'ARRAY'
28 0 12 if $@
32 7 5 if ($col_names)
34 0 7 ref $col_names eq 'ARRAY' ? :
47 1 11 if ($$parser{'col_names'} and not $col_names)
50 0 1 ref $$parser{'col_names'} eq 'ARRAY' ? :
60 0 12 if $@
64 0 12 if ($storage_name =~ /PassThru/)
67 0 0 if $$flags{'file'} and $$flags{'file'} =~ /http:|ftp:/
81 0 0 if (-d $format_dir)
122 0 0 unless ($createMode)
127 0 0 if not $col_names && scalar @$col_names and 'ru' =~ /$$self{'storage'}{'open_mode'}/ and !$createMode eq 'o'
149 0 0 if ($$self{'parser'}{'skip_pattern'}) { }
153 0 0 unless defined $rec
154 0 0 if $rec =~ /$$self{'parser'}{'skip_pattern'}/
161 0 0 if ref $rec eq 'ARRAY'
162 0 0 unless $rec
164 0 0 if scalar @fields == 1 and not defined $fields[0]
172 0 0 if (ref $rec eq 'ARRAY') { }
176 0 0 unless defined $rec
178 0 0 if scalar @fields == 1 and not defined $fields[0]
180 0 0 if (my $subs = $$self{'parser'}{'read_sub'})
183 0 0 unless defined $col
185 0 0 unless defined $col_num
195 0 0 unless $$self{'parser'}{'col_names'} and $self->parser_type ne 'XML'
213 0 42 unless scalar @{$self->col_names;}
216 6 36 if (ref $row[0] eq 'ARRAY')
219 0 42 unless my $rec = $$self{'parser'}->write_fields(@row)
225 0 0 unless scalar @{$self->col_names;}
230 0 0 if (ref $row[0] eq 'ARRAY')
233 0 0 unless my $rec = $$self{'parser'}->write_fields(@row)
244 0 290 unless ref $c eq 'ARRAY' and scalar @$c
249 0 11 if $file and $file =~ m[^http://|ftp://]
265 0 11 if (ref $formatref eq 'HASH' or $$othflags{'data'}) { }
268 0 0 if (ref $formatref eq 'HASH')
277 6 5 if ($$flags{'cols'})
281 8 3 if (ref $file eq 'ARRAY') { }
282 0 8 if ($format eq 'Mp3' or $format eq 'FileSys') { }
287 1 7 if $format =~ /ARRAY/i
288 8 0 unless $format eq 'XML'
295 0 11 if ($format ne 'XML' and $format eq 'Base' || $url)
300 0 0 $format eq 'Base' ? :
309 0 11 if defined $lockMode
310 0 11 if $createMode and $lockMode
311 0 11 if not $createMode and $lockMode
313 7 4 if $$flags{'col_names'} and 'ru' =~ /$read_mode/
331 11 0 if $$col_names[0]
343 35 186 unless my $rec = $self->get_undeleted_record
344 162 24 ref $rec eq 'ARRAY' ? :
348 0 186 unless scalar @fields
349 0 186 if scalar @fields == 1 and not defined $fields[0]
358 0 235 if $self->parser_type eq 'XML'
361 37 252 unless defined $rec
362 54 198 if $$self{'storage'}->is_deleted($$self{'parser'})
363 0 198 if $$self{'parser'}{'skip_pattern'} and $rec =~ /$$self{'parser'}{'skip_pattern'}/
382 6 12 if defined $$newvals{$colnames[$i]}
384 12 6 unless defined $newrow[$i]
398 24 6 unless $self->match($row, $key)
399 0 6 $$self{'parser'}{'has_update_function'} ? :
402 0 6 $$self{'parser'}{'has_update_function'} ? :
406 6 0 unless ($$self{'parser'}{'has_update_function'})
415 34 73 if (ref $key ne 'HASH')
416 18 16 if not $$row{$self->key_col} or $$row{$self->key_col} ne $key
422 24 6 unless defined $$row{$col} and is_matched($$row{$col}, $re)
425 49 24 if $found == scalar keys %$key
429 0 30 if (ref $re eq 'Regexp')
430 0 0 $str =~ /$re/ ? :
434 0 30 if ($re and $re =~ /^(\S*)\s+(.*)/) { }
30 0 elsif ($re) { }
439 6 24 $str =~ /$re/ ? :
442 0 0 $str eq '' ? :
446 0 0 unless ($numop =~ /$op/ or $chrop =~ /$op/)
447 0 0 $str =~ /$re/ ? :
449 0 0 if ($op eq '<')
450 0 0 if ($op eq '>')
451 0 0 if ($op eq '==')
452 0 0 if ($op eq '!=')
453 0 0 if ($op eq '<=')
454 0 0 if ($op eq '>=')
455 0 0 if ($op eq 'lt')
456 0 0 if ($op eq 'gt')
457 0 0 if ($op eq 'eq')
458 0 0 if ($op eq 'ne')
459 0 0 if ($op eq 'le')
460 0 0 if ($op eq 'ge')
475 0 0 unless $self->match($row, $key)
487 0 1 unless $table
492 10 2 defined $$row{$_} ? :
530 0 12 if $$self{'storage'}{'no_pack'}
531 9 3 unless ref($$self{'storage'}) =~ /File$/
535 3 0 unless scalar keys %{$$self{'storage'}{'deleted'};}
547 0 0 unless $fh and $bak_fh
549 0 0 unless $fh->seek(0, 0)
559 0 0 unless $fh->truncate(0)
576 2 8 if (ref $file eq 'ARRAY' and not $read_mode)
578 0 10 if (scalar @_ == 1)
597 0 0 if $errstr
607 0 2 if ($tformat eq $sformat and $tformat eq 'XML')
618 1 1 if defined $target_file_name
619 0 2 if $target_format eq 'ARRAY'
622 0 2 if ref $source_data eq 'ARRAY' and ref $$source_data[0] eq 'ARRAY'
627 2 0 if ($source_format eq 'adHash') { }
632 0 0 if $source_format =~ /ARRAY/i
640 0 2 if ($data_type eq 'ARRAY') { }
649 1 1 if ('XML HTMLtable' =~ /$target_format/)
654 0 1 if ($data_type eq 'ARRAY')
671 0 1 if ($target_type eq 'FILE') { }
1 0 elsif ($target_type eq 'STRING') { }
683 1 0 unless ($$target_ad{'parser'}{'no_col_print'})
684 0 1 if ($target_type eq 'ARRAY') { }
689 1 0 if $target_format eq 'Fixed'
690 0 1 if ($target_type eq 'FILE')
693 1 0 if ($target_type eq 'STRING')
700 0 1 if ($data_type eq 'ARRAY')
705 0 0 if $target_type eq 'FILE'
706 0 0 if $target_type eq 'STRING'
709 0 0 if $target_format ne 'ARRAY'
714 0 6 if ($target_format eq 'ARRAY')
715 0 0 if $target_format eq 'ARRAY'
720 0 6 $target_type eq 'FILE' ? :
724 1 0 if $target_format ne 'ARRAY'
750 6 6 if ref $row eq 'ARRAY'
797 0 11 if (ref $source_formatref eq 'HASH')