Branch Coverage

blib/lib/Text/CSV/Hashify.pm
Criterion Covered Total %
branch 53 56 94.6


line true false branch
191 1 9 unless @_ == 2
195 1 17 unless $args[$i]
204 2 4 $obj_args{'file'} =~ /\.tsv(\.gz)?$/ ? :
2 6 $obj_args{'file'} =~ /\.psv(\.gz)?$/ ? :
290 2 32 unless ref $args and &reftype($args) eq 'HASH'
292 1 31 unless $args->{'file'}
294 1 30 unless -f $args->{'file'}
297 1 29 if ($args->{'format'} and not $args->{'format'} =~ /^(?:h|a)oh$/i)
302 1 28 if (not exists $args->{'key'} and $data{'format'} ne 'aoh')
307 8 20 if (defined $args->{'max_rows'})
308 3 5 if (not $args->{'max_rows'} =~ /^[0-9]+$/) { }
319 0 25 unless my $csv = 'Text::CSV'->new($args)
322 8 17 if ($data{'file'} =~ /\.gz$/) { }
328 0 25 unless defined $IN
333 1 513 if (exists $header_fields_seen{$_}) { }
351 4229 10 if ($data{'format'} eq 'hoh') { }
353 1 4228 if ($keys_seen{$kk}) { }
363 2 4226 if defined $data{'max_rows'} and scalar CORE::keys %parsed_data == $data{'max_rows'}
371 1 9 if defined $data{'max_rows'} and scalar @parsed_data == $data{'max_rows'}
374 0 23 unless $IN->close
375 2 21 $data{'format'} eq 'aoh' ? :
376 21 2 if $data{'format'} eq 'hoh'
475 6 9 unless defined $key and $key ne ''
479 3 6 $self->{'format'} eq 'aoh' ? :
507 3 11 unless @args == 2
509 6 13 unless defined $args[$i] and $args[$i] ne ''
514 3 2 $self->{'format'} eq 'aoh' ? :
544 3 1 if (exists $self->{'keys'}) { }