Branch Coverage

blib/lib/Text/Fab.pm
Criterion Covered Total %
branch 99 124 79.8


line true false branch
24 11 11 if $offset == 0 and substr($buffer, 0, 1) eq "#"
26 0 11 $pos == -1 ? :
33 10 12 if $line_end == -1
38 20 2 if ($directive_line =~ /^#(\w+)\s*(.*)/u) { }
45 6 14 if ($directive eq 'target_section') { }
5 9 elsif ($directive eq 'set') { }
0 9 elsif ($directive eq 'append') { }
2 7 elsif ($directive eq 'set_parents') { }
2 5 elsif ($directive eq 'emb') { }
1 4 elsif ($directive eq 'start_group') { }
2 2 elsif ($directive eq 'end_group') { }
125 11 25 if ($args{'config'})
145 1 23 unless (defined $directive_start)
161 17 7 unless length $chunk_text
179 5 2 if ($self->{'config'}{'Fab/list_keys'}{$key}) { }
181 2 20 if exists $self->{'config'}{$full_key}
183 1 2 unless my $snapshot = pop @{$$self{"group_stack"};}
188 6 5 if ($type eq 'list') { }
2 3 elsif ($type eq 'hash') { }
189 1 5 if @args > 1
190 3 2 @args ? :
191 0 5 unless my $list = $self->{'config'}{$key}
192 0 5 unless ref $list eq "ARRAY"
193 1 4 if $count > @$list
195 1 3 wantarray ? :
199 0 0 wantarray ? :
0 2 unless @args
201 0 2 unless my $hash = $self->{'config'}{$key}
202 0 2 unless ref $hash eq "HASH"
204 1 1 wantarray ? :
208 1 2 if @args
216 3 8 if ($type eq 'list') { }
6 2 elsif ($type eq 'hash') { }
219 0 3 unless ref $list eq "ARRAY"
224 4 2 unless ref $value eq "ARRAY" and @$value == 2
228 0 2 unless ref $hash eq "HASH"
238 2 15 unless ref $joiners eq "ARRAY"
242 6 9 if ($type eq 'list') { }
7 2 elsif ($type eq 'hash') { }
243 0 6 unless my $list = $self->{'config'}{$key}
244 0 6 unless ref $list eq "ARRAY"
248 0 7 unless my $hash = $self->{'config'}{$key}
251 4 0 $joiners->$#* == 0 ? :
3 4 @$joiners > 1 ? :
261 2 2 unless ref $joiners eq "ARRAY"
264 0 2 unless my $all_chunks = $self->{'sections'}{$ns}{$basename}
272 15 22 if $self->{'config'}{'Fab/hash_keys'}{$key}
273 15 7 if $self->{'config'}{'Fab/list_keys'}{$key}
278 0 7 unless my $hash = $self->{'config'}{$key}
279 0 7 unless ref $hash eq "HASH"
285 0 0 unless my $hash = $self->{'config'}{$key}
293 2 13 unless $num_elements
294 2 11 if $num_elements == 1
297 4 7 if (my $mod = $options->{'permitted_joiners_modulo'})
298 2 2 if $num_joiners_to_use % $mod != 0
323 1 5 if $seen->{$id}
327 0 5 unless $chunks
332 4 2 if ($type eq 'text') { }
2 0 elsif ($type eq 'embed') { }
344 5 0 if exists $self->{'sections'}{$ns} and exists $self->{'sections'}{$ns}{$basename}
348 0 1 unless $self->{'config'}{$parents_key}
350 1 0 if $chunks