Branch Coverage

blib/lib/Data/Object/Cast.pm
Criterion Covered Total %
branch 91 120 75.8


line true false branch
25 3 79 unless defined $data
26 41 38 if &blessed($data)
33 17 21 if ref $data
34 18 3 if &looks_like_number($data)
41 3 38 if $data->isa('Regexp')
48 5 12 if 'ARRAY' eq ref $data
49 3 9 if 'CODE' eq ref $data
50 5 4 if 'HASH' eq ref $data
57 3 15 if $data =~ /\./u
73 2 2 if ($type and $type eq 'HASH')
76 0 4 ref $val ? :
79 2 2 if ($type and $type eq 'ARRAY')
82 0 8 ref $val ? :
87 2 2 wantarray ? :
94 0 18 unless $type
97 2 16 if $type eq 'ARRAY'
98 2 14 if $type eq 'HASH'
100 0 14 if $type eq 'BOOLEAN'
101 1 13 if $type eq 'REGEXP'
102 1 12 if $type eq 'FLOAT'
103 7 5 if $type eq 'NUMBER'
104 1 4 if $type eq 'STRING'
106 1 3 if $type eq 'UNDEF'
108 2 1 if ($type eq 'ANY' or $type eq 'SCALAR')
111 0 2 if $type eq 'ARRAY'
112 0 2 if $type eq 'HASH'
114 0 2 if $type eq 'BOOLEAN'
115 0 2 if $type eq 'FLOAT'
116 0 2 if $type eq 'NUMBER'
117 0 2 if $type eq 'REGEXP'
118 0 2 if $type eq 'STRING'
120 0 2 if $type eq 'UNDEF'
122 1 1 if ($type eq 'SCALAR')
126 1 0 if ($type eq 'REF')
127 1 0 if $type = TypeName($data = $$data)
131 1 0 if ($type eq 'CODE')
142 1 7 if ($data and 'HASH' eq ref $data)
145 2 0 ref $val ? :
148 1 7 if ($data and 'ARRAY' eq ref $data)
151 4 0 ref $val ? :
156 0 8 wantarray ? :
162 5 26 if $data->isa("${To}::Array")
163 0 26 if $data->isa("${To}::Boolean")
164 5 21 if $data->isa("${To}::Hash")
165 2 19 if $data->isa("${To}::Code")
166 2 17 if $data->isa("${To}::Float")
167 8 9 if $data->isa("${To}::Number")
168 2 7 if $data->isa("${To}::String")
169 3 4 if $data->isa("${To}::Scalar")
170 2 2 if $data->isa("${To}::Regexp")
171 2 0 if $data->isa("${To}::Undef")
181 5 0 if unshift @_, $class
189 3 0 if unshift @_, $class
197 3 0 if unshift @_, $class
205 5 0 if unshift @_, $class
213 15 0 if unshift @_, $class
221 3 0 if unshift @_, $class
229 4 0 if unshift @_, $class
237 3 0 if unshift @_, $class
245 3 0 if unshift @_, $class