Branch Coverage

lib/REST/Neo4p/Constrain.pm
Criterion Covered Total %
branch 25 66 37.8


line true false branch
54 0 5 if (@_ % 2)
57 0 5 unless ($parms{'tag'})
60 0 5 unless ($parms{'type'} and grep /^$parms{'type'}$/, @REST::Neo4p::Constraint::CONSTRAINT_TYPES)
65 2 3 if (/^node_property$/)
66 0 2 unless (ref $parms{'constraints'} eq 'HASH')
70 2 0 if defined $parms{'condition'}
77 0 2 if ($e = 'REST::Neo4p::LocalException'->caught)
80 0 2 if ($e = 'Exception::Class'->caught)
81 0 0 ref $e && $e->can('rethrow') ? :
85 1 2 if (/^relationship_property$/)
86 0 1 unless (ref $parms{'constraints'} eq 'HASH')
90 1 0 if defined $parms{'condition'}
91 1 0 if defined $parms{'rtype'}
98 0 1 if ($e = 'REST::Neo4p::LocalException'->caught)
101 0 1 if ($e = 'Exception::Class'->caught)
102 0 0 ref $e && $e->can('rethrow') ? :
106 1 1 if (/^relationship$/)
107 0 1 unless (ref $parms{'constraints'} eq 'ARRAY')
121 0 1 if ($e = 'REST::Neo4p::LocalException'->caught)
124 0 1 if ($e = 'Exception::Class'->caught)
125 0 0 ref $e && $e->can('rethrow') ? :
129 1 0 if (/^relationship_type$/)
130 0 1 unless (ref $parms{'constraints'} eq 'ARRAY')
143 0 1 if ($e = 'REST::Neo4p::LocalException'->caught)
146 0 1 if ($e = 'Exception::Class'->caught)
147 0 0 ref $e && $e->can('rethrow') ? :
171 0 0 unless $entity_type =~ /^node|relationship$/
175 0 0 unless (validate_properties($properties))
187 0 0 unless ref $props and ref $props eq 'HASH'
195 0 0 if ($entity_type eq 'relationship')
198 0 0 unless (validate_properties($orig_props))
209 0 0 unless (validate_relationship_type($reln_type) or not $REST::Neo4p::Constraint::STRICT_RELN_TYPES)
216 0 0 unless (validate_relationship($n1, $n2, $reln_type, $reln_props))