Branch Coverage

blib/lib/Type/Coercion.pm
Criterion Covered Total %
branch 79 120 65.8


line true false branch
24 0 650 (caller) =~ /^(Moo::HandleMoose|Sub::Quote)/ ? :
39 3 13 if ('Sub::Quote'->can('quote_sub') and $self->can_be_inlined) { }
42 3 0 unless $self->{'_overload_coderef'} and $self->{'_sub_quoted'}++
54 759 11430 @_ == 1 ? :
56 11396 793 unless exists $params{'name'}
61 270 11919 if @$C
64 14 12175 if $F
66 793 11396 unless ($self->is_anon)
69 0 793 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 12119 5 if $self->{'type_constraint'}
116 1 2 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 31 864 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 3 1161 if $self->frozen
240 1 1717 if (&blessed($type) and my $method = $type->can('type_coercion_map')) { }
245 0 1717 unless Types::TypeTiny::is_TypeTiny($type)
247 0 1717 unless Types::TypeTiny::is_StringLike($coercion) or Types::TypeTiny::is_CodeLike($coercion)
263 1 617 unless @mishmash
265 497 120 if ($self->can_be_inlined)
278 120 0 if ($self->has_type_constraint)
286 219 43 $types[$i]->can_be_inlined ? :
290 26 116 Types::TypeTiny::is_StringLike($codes[$i]) ? :
120 142 !defined($codes[$i]) ? :
315 47 1516 unless $self->frozen
318 79 1437 if $self->has_type_constraint and not $self->type_constraint->can_be_inlined
324 2 1463 unless $type->can_be_inlined
325 138 1325 unless Types::TypeTiny::is_StringLike($converter)
334 58 0 if $self->has_type_constraint
350 0 641 unless $self->can_be_inlined
353 0 641 unless @mishmash
360 641 0 if ($self->has_type_constraint)
369 637 641 defined $codes[$i] ? :
18 1278 defined $codes[$i] && $varname eq '$_' ? :
390 0 0 if $self->has_type_constraint
409 0 0 $modifier ? :
411 0 0 if (Types::TypeTiny::is_CodeLike($converter)) { }
435 0 7 unless @_
436 0 7 unless $self->is_parameterizable
455 0 7 unless $self->is_parameterized
472 0 0 if ($INC{'Moose.pm'} and &blessed($self) and $_[0] eq "Moose::Meta::TypeCoercion")
479 0 0 if ($INC{'Moose.pm'} and &blessed($self) and $_[0] =~ /^(Class::MOP|MooseX?)::/)
484 0 0 if $r
494 19 1 if $can
496 0 0 if ($INC{'Moose.pm'} and &blessed($self) and my $method = $self->moose_coercion->can(@_))
509 665 0 if $m eq "DESTROY"
511 0 0 if ($INC{'Moose.pm'} and &blessed($self) and my $method = $self->moose_coercion->can($m))
525 2 0 if (@_)
527 1 1 if (&blessed($thing) and $thing->isa('Type::Coercion')) { }
1 0 elsif (Types::TypeTiny::is_CodeLike($thing)) { }