Branch Coverage

blib/lib/YAML/PP/Dumper.pm
Criterion Covered Total %
branch 56 64 87.5


line true false branch
26 744 10 unless defined $header
28 749 5 unless defined $footer
37 753 1 unless (builtin::blessed($emitter))
43 0 754 if (keys %args)
102 18 1527 if ($self->version_directive)
126 964 2929 if (ref $value)
130 147 817 if ($seen->{$refaddr} and $seen->{$refaddr} > 1)
132 76 71 if (defined $anchor) { }
133 21 50 if ($self->representer->preserve_alias)
134 7 14 if (ref $node->{'value'} eq 'YAML::PP::Preserve::Scalar') { }
7 7 elsif (builtin::reftype($node->{'value'}) eq 'HASH') { }
7 0 elsif (builtin::reftype($node->{'value'}) eq 'ARRAY') { }
135 5 2 if (defined $node->{'value'}->alias)
141 7 0 if (my $tied = tied %{$$node{"value"};})
142 5 2 if (defined $tied->{'alias'})
149 7 0 if (my $tied = tied @{$$node{"value"};})
150 5 2 if (defined $tied->{'alias'})
157 56 15 unless (defined $node->{'anchor'})
178 76 3816 if ($type eq "alias")
182 458 3358 if ($type eq "mapping")
185 0 458 if ($node->{'items'} and @{$node->{'items'};} == 0)
199 266 3092 if ($type eq "sequence")
201 9 257 if (@{$node->{'items'};} == 0)
253 2073 896 unless my $reftype = builtin::reftype($doc)
256 64 832 if ($reftype eq "SCALAR" and grep {ref $doc eq $_;} @{[] unless $self->representer->schema->bool_class;})
257 0 81 unless $self->representer->schema->bool_class
260 64 0 if (ref $doc eq "boolean" or ref $doc eq "JSON::PP::Boolean")
264 76 756 if (++$$seen{builtin::refaddr($doc)} > 1)
268 0 756 unless ($_reftypes{$reftype})
272 456 300 if ($reftype eq 'HASH') { }
262 38 elsif ($reftype eq 'ARRAY') { }
8 30 elsif ($reftype eq 'REF') { }