Branch Coverage

blib/lib/Type/Library.pm
Criterion Covered Total %
branch 67 82 81.7


line true false branch
34 392 646 if $_[0]{'base'} or $_[0]{'extends'}
52 13 18677 if ($name =~ /^\+(.+)/ and $class->has_type("$1"))
57 58 0 unless $value
66 17726 951 if (my $f = $class->meta->{'functions'}{$name} and defined $class->meta->{'functions'}{$name}{'type'})
78 35449 3 unless exists $value->{$param}
79 0 3 unless defined $value->{'-as'}
89 8871 8855 if ($tag eq "types")
91 0 8871 if $globals->{'mouse'}
92 0 8871 if $globals->{'moose'}
93 2 8869 if $post_method or $custom_type
104 1 17723 if ($custom_type and $tag ne "types")
131 0 1 ref $into ? :
1 17722 if defined $type and $type->deprecated and not $globals->{'allow_deprecated'}
136 8303 9557 if (not ref $into and $into ne "-lexical" and defined $type and grep(($_ eq "types"), @$tags))
149 222 8081 $INC{'Type/Registry.pm'} ? :
160 809 2 if ($globals->{'declare'})
181 0 375 $extends ? :
17 375 ref $extends ? :
182 1 391 if $class ne "Type::Library"
184 392 0 unless (ref $type_library)
191 4 388 if ($install_utils)
199 18 374 if (@extends and not ref $type_library)
209 40500 77768 if &blessed($_[0])
217 4 12136 if $meta->{'immutable'}
222 9361 802 ref $_[0] eq 'HASH' ? :
0 10163 &blessed($_[0]) ? :
1973 10163 ref($_[0]) =~ /^Type::Tiny\b/ ? :
226 1 12135 if ($meta->has_type($name))
228 0 1 if $type->{'uniq'} == $existing->{'uniq'}
232 0 12135 if $meta->has_coercion($name)
233 1 12134 if $type->is_anon
245 1 48544 if $meta->{'functions'}{$name}
254 148 11985 $INC{'Type/Registry.pm'} ? :
266 0 1 if $meta->{'immutable'}
293 0 1 if $INC{'Type/Registry.pm'}
318 0 896 if $meta->{'immutable'}
321 136 760 &blessed($_[0]) ? :
324 0 896 if $meta->has_coercion($name)
325 1 895 if $meta->has_type($name)
326 0 895 if $c->is_anon
366 10624 574 unless $type->has_coercion and $type->coercion->frozen