Branch Coverage

blib/lib/PRANG/Graph/Meta/Element.pm
Criterion Covered Total %
branch 106 142 74.6


line true false branch
90 1 0 if ($class) { }
125 59 48 if ($self->has_xml_required) { }
25 23 elsif ($self->has_predicate or $self->has_xml_min and not $self->xml_min) { }
139 0 107 unless my $t_c = $self->type_constraint
145 21 86 if ($t_c->is_a_type_of('ArrayRef')) { }
0 166 elsif ($self->has_xml_max and $self->xml_max > 1 or $self->has_xml_min and $self->xml_min > 1) { }
148 21 0 if ($t_c->isa('Moose::Meta::TypeConstraint::Parameterized')) { }
156 0 21 unless ($is_paramd)
184 73 146 if ($x->isa('Moose::Meta::TypeConstraint::Class')) { }
16 130 elsif ($x->isa('Moose::Meta::TypeConstraint::Union')) { }
6 124 elsif ($x->isa('Moose::Meta::TypeConstraint::Enum')) { }
6 118 elsif ($x->isa('Moose::Meta::TypeConstraint::Role')) { }
118 0 elsif (ref $x eq 'Moose::Meta::TypeConstraint') { }
199 6 112 if ($x->equals('Bool')) { }
44 68 elsif ($x->equals('Value')) { }
218 44 63 $self->has_xml_nodeName ? :
222 4 103 $self->has_xml_nodeName_prefix ? :
231 16 91 if ($expect_concrete > 1)
235 0 16 unless (ref $nodeName)
241 0 38 unless (exists $t_c{$type})
253 6 101 if (@expect_role)
255 0 6 if ($self->has_xml_nodeName and not ref $self->xml_nodeName)
261 6 0 unless ref $nodeName
263 12 0 if ($user->does('PRANG::Graph')) { }
266 0 12 if ($xmlns = eval {
267 0 0 unless (exists $nodeName_r_prefix->{$xmlns})
277 0 12 if (exists $nodeName->{$plugin_nodeName})
278 0 0 $xmlns ? :
299 0 6 if (not $self->has_xml_nodeName_prefix and keys %$nodeName_prefix)
304 0 107 unless ($expect_concrete)
310 77 30 unless (ref $nodeName)
311 26 45 $expect_simple ? :
6 71 $expect_bool ? :
323 9 98 if ($self->has_xmlns) { }
328 0 98 if $xmlns
331 5 102 if ($self->has_xmlns_attr)
336 8 126 if ($nodeName_prefix and $name =~ /^(\w+):(\w+)/) { }
341 0 8 unless my $xmlns = $nodeName_prefix->{$1}
356 10 75 unless (eval {
358 0 10 unless ($ok)
363 0 85 unless (eval {
368 0 85 unless (@names)
380 0 0 ref $self->xml_nodeName ? :
0 0 $self->has_xml_nodeName ? :
401 6 101 if ($expect_bool)
419 44 63 if ($expect_simple)
422 0 44 unless $t_c
433 5 39 if (not length $name) { }
466 0 107 if ($fixed_xmlns and $use_prefixes)
474 8 131 if ($use_prefixes) { }
489 5 134 if $localname eq "*"
490 6 133 if $xmlns eq "*"
493 4 135 if (my $aref = $seen_types{$class}) { }
506 9 98 if ($have_ambiguous) { }
0 98 elsif ($self->has_xmlns_attr or $self->has_xml_nodeName_attr) { }
98 0 elsif ($self->has_xml_nodeName) { }
507 7 2 if (keys %seen_localname > 1 or $seen_localname{'*'}) { }
508 0 7 if (not $self->has_xml_nodeName_attr) { }
527 5 4 if (keys %seen_xmlns > 1 or $seen_xmlns{'*'}) { }
528 0 5 if (not $self->has_xmlns_attr) { }
552 2 96 if ($self->has_xml_nodeName_prefix)
558 26 81 if (@expect > 1) { }
567 2 79 if ($self->has_xml_nodeName_attr)
572 6 101 if ($expect_bool)
575 1 5 if ($expect_one and not $expect_simple and not $self->is_required and not $self->has_default)
592 85 22 if (not $expect_one or $expect_many) { }
594 8 77 if ($expect_one and not $self->has_xml_min)
597 21 64 if ($self->has_xml_min)
600 64 0 unless ($expect_many or $self->has_xml_max)
603 68 17 if ($self->has_xml_max)
606 0 85 unless $node