Branch Coverage

blib/lib/Data/Visitor/Callback.pm
Criterion Covered Total %
branch 53 72 73.6


line true false branch
56 122 36 unless / :: | ^[A-Z] /x
82 1 126 if ($refaddr and exists $replaced_hash->{$refaddr})
94 256 23 if (defined wantarray) { }
100 5 121 if $refaddr and !ref($_) || $refaddr ne &refaddr($_)
102 256 23 if defined wantarray
105 280 0 @_ == 1 ? :
113 102 0 if (ref $mapped) { }
126 7 2 if (&refaddr($mapped) == &refaddr($data)) { }
137 34 153 ref $data ? :
150 0 5 unless &blessed($data)
151 0 5 unless $data->isa($class)
159 20 4 unless $class_cb
161 24 0 if &blessed($data)
170 4 0 if ((&reftype($new_data) || '') =~ /^(?: SCALAR | REF | LVALUE | VSTRING ) $/x) { }
174 4 0 if (&refaddr($visited) != &refaddr($data)) { }
187 0 28 unless eval "\n\t\t\tsub " . $name . " {\n\t\t\t\tmy ( \$self, \$data ) = \@_;\n\t\t\t\tmy \$new_data = \$self->callback_and_reg( " . $reftype . " => \$data );\n\t\t\t\tif ( \"" . uc($reftype) . "\" eq (reftype(\$new_data)||\"\") ) {\n\t\t\t\t\tmy \$visited = \$self->SUPER::" . $name . "( \$new_data );\n\n\t\t\t\t\tno warnings \"uninitialized\";\n\t\t\t\t\tif ( refaddr(\$visited) != refaddr(\$data) ) {\n\t\t\t\t\t\treturn \$self->_register_mapping( \$data, \$visited );\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn \$visited;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn \$self->_register_mapping( \$data, \$self->visit( \$new_data ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t1;\n\t\t"
15 0 if (&refaddr($visited) != &refaddr($data)) { }
15 1 if ('ARRAY' eq (&reftype($new_data) || '')) { }
0 34 if (&refaddr($visited) != &refaddr($data)) { }
34 0 if ('CODE' eq (&reftype($new_data) || '')) { }
3 0 if (&refaddr($visited) != &refaddr($data)) { }
3 0 if ('GLOB' eq (&reftype($new_data) || '')) { }
44 0 if (&refaddr($visited) != &refaddr($data)) { }
44 1 if ('HASH' eq (&reftype($new_data) || '')) { }
214 19 87 if ($self->ignore_return_values) { }
216 0 87 if (ref $value and &refaddr($value) != &refaddr($new_value)) { }
218 0 0 if ($key ne $new_key) { }
224 0 87 if ($key ne $new_key) { }
238 104 950 if (my $code = $self->callbacks->{$name}) { }
240 32 72 if (wantarray) { }
242 32 0 $self->ignore_return_values ? :
245 48 24 $self->ignore_return_values ? :
248 353 597 wantarray ? :
257 451 107 unless ($self->ignore_return_values)
259 221 230 if (ref $data)
260 14 207 if (&refaddr($data) != &refaddr($new_data))