Branch Coverage

blib/lib/Mouse/Meta/TypeConstraint.pm
Criterion Covered Total %
branch 59 68 86.7


line true false branch
6 2 6866 @_ == 1 ? :
8 12 6856 unless defined $args{'name'}
11 6550 318 if (defined $args{'parent'})
20 16 6534 if (defined(my $parent_tp = $args{'parent'}{'type_parameter'}))
21 3 13 if ($parent_tp != $type_parameter) { }
22 1 2 unless $type_parameter->is_a_type_of($parent_tp)
35 5870 997 if ($check = delete $args{'optimized'}) { }
53 944 elsif (defined $type_parameter) { }
47 7 44 if (defined(my $my_check = $args{'constraint'})) { }
61 0 6865 if (defined $check and ref $check ne 'CODE')
68 995 5870 unless $args{'hand_optimized_type_constraint'}
70 20 6845 if ($args{'type_constraints'})
72 3 37 if ($type->has_coercion)
107 0 30 if (exists $self->{'type_constraints'})
119 1 35 if (exists $has{$from})
123 1 34 unless my $type = Mouse::Util::TypeConstraints::find_or_parse_type_constraint($from)
138 103 27 if defined $coercion
140 24 3 if (not $self->{'type_constraints'}) { }
151 117 16 if ($pair->[0]->($thing))
161 4 4 if ($type->has_coercion)
165 3 0 if (@coercions)
170 3 3 if $self->check($value)
182 16 130 if $self->check(@_)
184 0 130 unless my $coercion = $self->_compiled_type_coercion
191 11 822 if (my $msg = $self->message) { }
195 42 780 if (not defined $value) { }
371 818 elsif (ref $value and defined &overload::StrVal) { }
209 0 73 if not ref $other and $other eq '__ANON__'
213 22 51 if $self->name eq $other_name
215 0 51 if (exists $self->{'type_constraints'})
217 0 0 if $type->name eq $other_name
222 31 91 if $p->name eq $other_name
232 0 45 unless (ref $param)
248 1 1 unless ($self->check($value))