Branch Coverage

blib/lib/Type/Coercion.pm
Criterion Covered Total %
branch 95 120 79.1


line true false branch
24 0 719 (caller) =~ /^(Moo::HandleMoose|Sub::Quote)/ ? :
39 3 14 if ('Sub::Quote'->can('quote_sub') and $self->can_be_inlined) { }
42 3 0 unless $self->{'_overload_coderef'} and $self->{'_sub_quoted'}++
54 846 12658 @_ == 1 ? :
56 12612 892 unless exists $params{'name'}
61 301 13203 if @$C
64 16 13488 if $F
66 892 12612 unless ($self->is_anon)
69 0 892 unless $self->name =~ /^_{0,2}[A-Z][A-Za-z0-9_]+$/ms or eval " use 5.008; \$self->name =~ /^_{0,2}\\p{Lu}[\\p{L}0-9_]+\$/sm "
111 13424 6 if $self->{'type_constraint'}
116 1 5 if (my $check = $self->{'_compiled_type_constraint_check'})
126 0 2 if Types::TypeTiny::is_TypeTiny($x)
127 0 2 if Types::TypeTiny::is_TypeTiny($y)
129 0 2 unless &blessed($x) and &blessed($y) and $x->isa($class) and $y->isa($class)
135 0 2 if $swap
138 2 0 if ($x->has_type_constraint and $y->has_type_constraint and $x->type_constraint == $y->type_constraint) { }
0 0 elsif ($x->has_type_constraint and $y->has_type_constraint) { }
152 0 2 if $opts{'display_name'} eq "__ANON__+__ANON__"
167 43 969 if ($self->has_library and not $self->is_anon)
195 64 0 if $self->has_type_constraint
204 2 15 if $self->has_type_constraint and $type->is_a_type_of($self->type_constraint)
210 11 8 if $type->is_a_type_of($c->[$i])
219 1 5 if $self->has_type_constraint and $self->type_constraint->check(@_)
225 3 4 if $c->[$i]->check(@_)
234 4 1276 if $self->frozen
240 1 1903 if (&blessed($type) and my $method = $type->can('type_coercion_map')) { }
245 0 1903 unless Types::TypeTiny::is_TypeTiny($type)
247 0 1903 unless Types::TypeTiny::is_StringLike($coercion) or Types::TypeTiny::is_CodeLike($coercion)
263 1 681 unless @mishmash
265 540 141 if ($self->can_be_inlined)
278 141 0 if ($self->has_type_constraint)
286 251 68 $types[$i]->can_be_inlined ? :
290 27 151 Types::TypeTiny::is_StringLike($codes[$i]) ? :
141 178 !defined($codes[$i]) ? :
315 59 1622 unless $self->frozen
318 82 1540 if $self->has_type_constraint and not $self->type_constraint->can_be_inlined
324 2 1568 unless $type->can_be_inlined
325 141 1427 unless Types::TypeTiny::is_StringLike($converter)
334 64 0 if $self->has_type_constraint
350 0 689 unless $self->can_be_inlined
353 0 689 unless @mishmash
360 689 0 if ($self->has_type_constraint)
369 684 689 defined $codes[$i] ? :
22 1373 defined $codes[$i] && $varname eq '$_' ? :
390 16 1 if $self->has_type_constraint
409 22 0 $modifier ? :
411 13 9 if (Types::TypeTiny::is_CodeLike($converter)) { }
435 0 8 unless @_
436 0 8 unless $self->is_parameterizable
455 0 8 unless $self->is_parameterized
472 2 4 if ($INC{'Moose.pm'} and &blessed($self) and $_[0] eq "Moose::Meta::TypeCoercion")
479 1 3 if ($INC{'Moose.pm'} and &blessed($self) and $_[0] =~ /^(Class::MOP|MooseX?)::/)
484 1 0 if $r
494 20 4 if $can
496 2 1 if ($INC{'Moose.pm'} and &blessed($self) and my $method = $self->moose_coercion->can(@_))
509 704 2 if $m eq "DESTROY"
511 1 1 if ($INC{'Moose.pm'} and &blessed($self) and my $method = $self->moose_coercion->can($m))
525 2 40 if (@_)
527 1 1 if (&blessed($thing) and $thing->isa('Type::Coercion')) { }
1 0 elsif (Types::TypeTiny::is_CodeLike($thing)) { }