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'
99 0 14 if $type eq 'BOOLEAN'
100 1 13 if $type eq 'REGEXP'
101 1 12 if $type eq 'FLOAT'
102 7 5 if $type eq 'NUMBER'
103 1 4 if $type eq 'STRING'
104 1 3 if $type eq 'UNDEF'
106 2 1 if ($type eq 'ANY' or $type eq 'SCALAR')
109 0 2 if $type eq 'ARRAY'
110 0 2 if $type eq 'HASH'
111 0 2 if $type eq 'BOOLEAN'
112 0 2 if $type eq 'FLOAT'
113 0 2 if $type eq 'NUMBER'
114 0 2 if $type eq 'REGEXP'
115 1 1 if $type eq 'SCALAR'
116 0 1 if $type eq 'STRING'
117 0 1 if $type eq 'UNDEF'
119 1 0 if ($type eq 'REF')
120 1 0 if $type = TypeName($data = $$data)
124 1 0 if ($type eq 'CODE')
135 1 7 if ($data and 'HASH' eq ref $data)
138 2 0 ref $val ? :
141 1 7 if ($data and 'ARRAY' eq ref $data)
144 4 0 ref $val ? :
149 0 8 wantarray ? :
155 5 26 if $data->isa("${To}::Array")
156 0 26 if $data->isa("${To}::Boolean")
157 5 21 if $data->isa("${To}::Hash")
158 2 19 if $data->isa("${To}::Code")
159 2 17 if $data->isa("${To}::Float")
160 8 9 if $data->isa("${To}::Number")
161 2 7 if $data->isa("${To}::String")
162 3 4 if $data->isa("${To}::Scalar")
163 2 2 if $data->isa("${To}::Regexp")
164 2 0 if $data->isa("${To}::Undef")
174 5 0 if unshift @_, $class
182 3 0 if unshift @_, $class
190 3 0 if unshift @_, $class
198 5 0 if unshift @_, $class
206 15 0 if unshift @_, $class
214 3 0 if unshift @_, $class
222 4 0 if unshift @_, $class
230 3 0 if unshift @_, $class
238 3 0 if unshift @_, $class