Branch Coverage

blib/lib/Class/Cloneable.pm
Criterion Covered Total %
branch 44 46 95.6


line true false branch
26 2 58 unless UNIVERSAL::isa((caller)[0], 'Class::Cloneable') or UNIVERSAL::isa((caller)[0], 'Class::Cloneable::Util')
30 1 57 unless defined $to_clone
34 5 52 unless ref $to_clone
36 6 46 unless (defined $cache)
40 4 2 if (blessed $to_clone and $to_clone->isa('Class::Cloneable'))
54 4 44 if exists $$cache{$to_clone}
62 2 49 unless UNIVERSAL::isa((caller)[0], 'Class::Cloneable') or UNIVERSAL::isa((caller)[0], 'Class::Cloneable::Util')
66 5 44 unless ref $to_clone and (ref $cache and ref $cache eq 'HASH')
70 9 35 if (blessed $to_clone)
75 4 5 $to_clone->can('clone') ? :
89 2 44 unless UNIVERSAL::isa((caller)[0], 'Class::Cloneable') or UNIVERSAL::isa((caller)[0], 'Class::Cloneable::Util')
93 5 39 unless ref $to_clone and (ref $cache and ref $cache eq 'HASH')
95 35 4 unless defined $ref_type
98 0 39 if isweak $to_clone
100 16 23 if ($ref_type eq 'HASH') { }
13 10 elsif ($ref_type eq 'ARRAY') { }
6 4 elsif ($ref_type eq 'REF' or $ref_type eq 'SCALAR') { }
102 2 14 if $tied = tied %{$to_clone;}
103 38 54 ref $_ ? :
107 2 11 if $tied = tied @{$to_clone;}
108 6 14 ref $_ ? :
113 2 4 if $tied = tied ${$to_clone;}
123 0 39 if $is_weak