Branch Coverage

lib/Parse/Taxonomy/AdjacentList.pm
Criterion Covered Total %
branch 103 108 95.3


line true false branch
178 2 50 unless ref $args and &reftype($args) eq 'HASH'
181 27 23 if $args->{'file'}
182 23 27 if $args->{'components'}
183 1 49 if $argscount == 0
185 1 48 if $argscount == 2
190 10 38 $args->{'id_col'} ? :
193 10 38 $args->{'parent_id_col'} ? :
196 8 40 $args->{'leaf_col'} ? :
198 22 26 if ($args->{'components'}) { }
200 2 20 unless ref $args->{'components'} and &reftype($args->{'components'}) eq 'HASH'
203 2 35 unless exists $args->{'components'}{$k}
206 3 32 unless ref $args->{'components'}{$k} and &reftype($args->{'components'}{$k}) eq 'ARRAY'
209 2 171 unless ref $row and &reftype($row) eq 'ARRAY'
219 1 25 unless -f $args->{'file'}
222 0 25 unless my $csv = 'Text::CSV_XS'->new($args)
225 0 25 unless open my $IN, '<', $data->{'file'}
230 0 21 unless close $IN
242 25 13 if (not $components) { }
260 6 102 unless (exists $col2idx{$data->{$c}})
268 6 30 if scalar keys %missing_columns
287 2 380 unless ($$rec[$data->{'id_col_idx'}] =~ /^\d+$/)
290 2 380 if (length $$rec[$data->{'parent_id_col_idx'}] and not $$rec[$data->{'parent_id_col_idx'}] =~ /^\d+$/)
300 6 376 if ($this_row_count != $field_count)
304 3 379 unless (length $$rec[$data->{'leaf_col_idx'}])
315 1 29 if @non_numeric_id_records
319 4 361 if $ids_seen{$id} > 1
328 2 27 if @dupe_ids
338 2 25 if @bad_count_records
348 1 24 if @nameless_component_records
353 4 300 if (length $parent_id and not $ids_seen{$parent_id})
366 2 22 if scalar keys %ids_missing_parents
370 207 71 if (length $$rec[$data->{'parent_id_col_idx'}])
383 5 197 if ($families{$k}{$l} > 1)
389 3 19 if $same_names
685 13 8 if (defined $args)
686 2 11 unless (ref $args and &reftype($args) eq 'HASH')
692 1 14 unless $permissible_args{$k}
694 1 9 if ($args->{'path_col_sep'} and not $args->{'as_string'})
698 5 12 defined $args->{'path_col'} ? :
699 6 11 if ($args->{'as_string'})
700 2 4 defined $args->{'path_col_sep'} ? :
707 47 34 unless ($f eq $self->id_col or $f eq $self->parent_id_col or $f eq $self->leaf_col)
730 259 207 if (length $parent_id) { }
742 62 145 if ($args->{'as_string'}) { }
837 8 1 if (defined $args) { }
838 2 6 unless ref $args and &reftype($args) eq 'HASH'
841 1 5 unless exists $args->{'pathified'}
844 2 3 unless ref $args->{'pathified'} and &reftype($args->{'pathified'}) eq 'ARRAY'
854 1 2 !ref($pathified->[1][0]) ? :
872 1 2 defined $args->{'csvfile'} ? :
884 0 3 unless open my $OUT, '>:encoding(utf8)', $csvfile
886 1 2 defined $csv_args->{'eol'} ? :
895 9 18 $path_as_string ? :
899 0 3 unless close $OUT