Branch Coverage

blib/lib/Mouse/PurePerl.pm
Criterion Covered Total %
branch 23 170 13.5


line true false branch
17 0 1 if ref $class
18 0 1 unless defined $class
20 1 0 if $class =~ /\A \w+ (?: :: \w+ )* \z/msx
28 0 1 if ref $class or not defined $class or not length $class
36 0 2 unless exists $pack->{$part}
39 0 2 if ref $entry ne 'GLOB'
43 0 1 unless %{$pack;}
47 0 0 if exists $pack->{'VERSION'} and defined *{$pack->{'VERSION'};}{'SCALAR'} and defined ${$$pack{'VERSION'};}
49 0 0 if exists $pack->{'ISA'} and defined *{$pack->{'ISA'};}{'ARRAY'} and @{$pack->{'ISA'};} != 0
54 1 1 if ref $entry ne 'GLOB' or defined *{$entry;}{'CODE'}
65 0 2 unless ref $coderef
68 0 2 unless $cv->isa('B::CV')
71 0 2 unless $gv->isa('B::GV')
80 0 0 unless $cv->isa('B::CV')
83 0 0 unless $gv->isa('B::GV')
99 0 0 if &Scalar::Util::blessed($_[0])
101 0 1 if (defined $name)
116 0 2 if (&Scalar::Util::blessed($instance))
118 0 0 unless ($instance->can($method))
127 3 0 if (defined $name)
141 0 0 unless not $_[0]
144 0 0 if defined $_[0]
175 0 0 if &Scalar::Util::blessed($_[0])
186 0 0 unless &$check($value)
198 0 0 unless &$check($value)
230 0 1 unless (defined $name)
233 0 1 unless (defined $code)
237 0 1 if (ref $code ne 'CODE')
253 0 0 if (@_)
258 0 0 unless my $meta = Mouse::Util::get_metaclass_by_name($class)
261 0 0 if (exists $meta->{$name})
275 0 0 unless $_[0]{'method_metaclass'}
276 0 0 unless $_[0]{'attribute_metaclass'}
278 0 0 unless $_[0]{'constructor_class'}
279 0 0 unless $_[0]{'destructor_class'}
291 0 0 @_ == 1 ? :
297 0 0 if ($object->can('BUILD'))
313 0 0 unless &Scalar::Util::blessed($object) and $object->isa($class->name)
355 0 0 if (defined $init_arg)
361 0 0 unless (exists $init_args{$key})
374 0 0 unless $_[0]{'method_metaclass'}
424 0 0 unless $_[0]{'accessor_metaclass'}
443 0 0 if defined $instance and ref $value eq 'CODE'
481 0 0 unless defined $name
484 0 0 unless (exists $args->{'init_arg'})
491 0 0 if (exists $args->{'builder'}) { }
0 0 elsif (exists $args->{'default'}) { }
497 0 0 unless defined $args->{'builder'}
502 0 0 if (ref $args->{'default'} and ref $args->{'default'} ne 'CODE')
509 0 0 if ($args->{'required'} and not $can_be_required)
515 0 0 if (exists $args->{'is'})
518 0 0 if ($is eq 'ro') { }
0 0 elsif ($is eq 'rw') { }
0 0 elsif ($is eq 'bare') { }
522 0 0 if (exists $args->{'writer'}) { }
533 0 0 unless defined $is
539 0 0 if (exists $args->{'isa'})
543 0 0 if (exists $args->{'does'})
544 0 0 if (defined $tc) { }
549 0 0 unless ($does_ok)
558 0 0 if ($args->{'coerce'})
559 0 0 unless defined $tc
563 0 0 if $args->{'weak_ref'}
566 0 0 if ($args->{'lazy_build'})
568 0 0 if exists $args->{'default'}
572 0 0 if ($name =~ /^_/) { }
582 0 0 if ($args->{'auto_deref'})
583 0 0 unless defined $tc
586 0 0 unless $tc->is_a_type_of('ArrayRef') or $tc->is_a_type_of('HashRef')
590 0 0 if (exists $args->{'trigger'})
592 0 0 unless 'CODE' eq ref $args->{'trigger'}
595 0 0 if ($args->{'lazy'})
597 0 0 unless exists $args->{'default'} or defined $args->{'builder'}
632 0 3 if ($parent->{'hand_optimized_type_constraint'}) { }
0 3 elsif ($parent->{'constraint'}) { }
642 0 3 if ($self->{'constraint'})
646 0 3 if ($self->{'type_constraints'})
650 0 0 if &$c($_[0])
656 3 0 if (@checks == 0) { }
664 0 0 unless &$c(@args)
684 0 0 if (scalar @_ == 1) { }
685 0 0 unless ref $_[0] eq 'HASH'
704 0 0 unless $self->can('DEMOLISH')
728 0 0 if $e
735 0 0 unless $self->can('BUILD')