Condition Coverage

lib/Mousse.pm
Criterion Covered Total %
condition 46 393 11.7


and 3 conditions

line !l l&&!r l&&r condition
81 5 0 0 exists $$pack{'VERSION'} and defined *{$$pack{'VERSION'};}{'SCALAR'}
5 0 0 exists $$pack{'VERSION'} and defined *{$$pack{'VERSION'};}{'SCALAR'} and defined ${$$pack{'VERSION'};}
83 4 0 1 exists $$pack{'ISA'} and defined *{$$pack{'ISA'};}{'ARRAY'}
4 0 1 exists $$pack{'ISA'} and defined *{$$pack{'ISA'};}{'ARRAY'} and @{$$pack{'ISA'};} != 0
184 0 0 0 defined $value && ref \$value eq 'SCALAR'
189 0 0 0 defined $value && $value =~ /\A -? [0-9]+ \z/msx
347 0 0 0 &Scalar::Util::blessed($object) and $object->isa($class->name)
531 0 0 0 ref $$args{'default'} and ref $$args{'default'} ne 'CODE'
538 2 0 0 $$args{'required'} and not $can_be_required
1016 0 0 0 ref $gv eq 'GLOB' and *{$gv;}{'CODE'} == $$spec{'EXPORTS'}{$keyword}
1111 0 0 0 $@ and $ENV{'MOUSE_XS'}
1218 0 0 0 defined $meta && $meta->does_role($role_name)
1335 0 0 0 $i + 1 < $max and ref $_[$i + 1] eq 'HASH'
1395 0 0 0 exists $args{'longmess'} and not $args{'longmess'}
1470 0 0 0 &$parameterized_check($_) && &$my_check($_)
1482 3 20 0 defined $check and ref $check ne 'CODE'
1618 0 0 0 ref $value and defined &overload::StrVal
1632 0 0 0 not ref $other and $other eq '__ANON__'
1799 2 0 0 @_ == 1 and ref $_[0]
2 0 0 @_ == 2 and ref $_[1]
1820 0 2 0 $is_subtype and not $parent
1906 0 0 0 &Scalar::Util::blessed($_[0]) && Mousse::Util::does_role($_[0], $role)
1920 0 0 0 @_ == 1 && ref $_[0] eq 'ARRAY'
1940 0 0 0 @_ == 1 and ref $_[0] eq 'ARRAY'
1945 0 0 0 @_ == 1 && ref $_[0] eq 'ARRAY'
1951 0 0 0 defined $_[0] && !ref($_[0]) && exists $valid{$_[0]}
2208 0 0 0 defined $SUPER_PACKAGE and $SUPER_PACKAGE ne caller()
2331 2 0 0 @bad and $class ne 'Mousse::Meta::Attribute'
2436 0 0 0 exists $$args{$illegal} and exists $$self{$illegal}
2693 0 0 2 $mm and $mm == \&Mousse::Util::meta
2762 0 0 0 $self_lin_isa[0] eq $other_lin_isa[0] && $self_lin_isa[0]
2858 2 0 0 not $$attr{'associated_methods'} and ($$attr{'is'} || '') ne 'bare'
3116 0 0 0 &Scalar::Util::blessed($r) && $l->body == $r->body && $l->name eq $r->name && $l->package_name eq $r->package_name
3143 2 0 0 defined $constraint && $constraint->has_coercion && $attribute->should_coerce
3206 2 0 0 $attribute->is_lazy and $type ne 'wo'
3383 0 0 0 $attr->should_coerce && $type_constraint->has_coercion
3499 0 0 0 $class->can('BUILDARGS') and $class->can('BUILDARGS') != \&Mousse::Object::BUILDARGS
3550 0 0 0 defined $tc && $tc->is_a_type_of('Object') && ($attr->is_required || $attr->has_default || $attr->has_builder) && ($attr->is_lazy || !$attr->has_clearer)
3568 0 0 0 ref $proxy && !&Scalar::Util::blessed($proxy)
3665 0 0 7 $package_name and not ref $package_name
3677 0 0 0 $package_name and not ref $package_name
3730 0 0 0 $code && !exists($foreign{Mousse::Util::get_code_package($code)})
3906 0 0 0 defined $roles and not $options{'in_application_to_instance'}
4088 0 0 0 $$args{'alias'} and not exists $$args{-'alias'}
4091 0 0 0 $$args{'excludes'} and not exists $$args{-'excludes'}
4216 0 0 0 defined $dstcode and $dstcode != $code
4358 0 0 0 $existing and $existing != $spec
4370 0 0 0 $existing and $existing != $code

or 2 conditions

line l !l condition
212 0 0 Mousse::Util::class_of($_[0]) || (return 0)
333 0 0 Mousse::Util::get_code_ref($class, 'BUILD') || (next)
419 0 0 $$self{'before_method_modifiers'}{$method_name} ||= []
425 0 0 $$self{'around_method_modifiers'}{$method_name} ||= []
431 0 0 $$self{'after_method_modifiers'}{$method_name} ||= []
437 0 0 $$self{'before_method_modifiers'}{$method_name} ||= []
441 0 0 $$self{'around_method_modifiers'}{$method_name} ||= []
445 0 0 $$self{'after_method_modifiers'}{$method_name} ||= []
746 0 0 Mousse::Util::get_code_ref($class, 'DEMOLISH') || (next)
766 0 0 Mousse::Util::get_code_ref($class, 'BUILD') || (next)
894 0 5 $args{'groups'}{'all'} ||= \@all
905 0 4 $args{'groups'}{'default'} ||= \@all
1102 0 0 eval sprintf("#line %d %s\n", '1102', $hack_mouse_file) . "\n\t\t\tlocal \$^W = 0; # workaround 'redefine' warning to &install_subroutines\n\t\t\trequire XSLoader;\n\t\t\tXSLoader::load('Mousse', \$VERSION);\n\t\t\tMousse::Util->import({ into => 'Mousse::Meta::Method::Constructor::XS' }, ':meta');\n\t\t\tMousse::Util->import({ into => 'Mousse::Meta::Method::Destructor::XS' }, ':meta');\n\t\t\tMousse::Util->import({ into => 'Mousse::Meta::Method::Accessor::XS' }, ':meta');\n\t\t\treturn 1;\n\t\t" || 0
1215 0 0 $meta || 'Mousse::Meta::Class'
1392 0 0 $args{'depth'} || 0
1533 0 0 $$self{'coercion_map'} ||= []
1840 0 0 $TYPE{$name}{'package_defined_in'} || 'Mousse::Util::TypeConstraints'
2247 0 2 $args{'base_class'} || 'Mousse::Object'
2248 0 2 $args{'metaclass'} || 'Mousse::Meta::Class'
2858 0 0 $$attr{'is'} || ''
4131 0 0 Mousse::Util::class_of($instance) || 'Mousse::Meta::Class'
4312 0 0 $$self{'methods'}{$method_name} || 0
4322 0 0 $$self{'composed_roles_by_method'}{$method_name} ||= []
4570 0 0 $args{'metaclass'} || 'Mousse::Meta::Role'

or 3 conditions

line l !l&&r !l&&!r condition
62 0 0 5 ref $class or not defined $class
0 0 5 ref $class or not defined $class or not length $class
88 0 4 4 ref $entry ne 'GLOB' or defined *{$entry;}{'CODE'}
195 0 0 0 ref $value eq 'SCALAR' || ref $value eq 'REF'
205 0 0 0 &Scalar::Util::openhandle($value) || &Scalar::Util::blessed($value) && $value->isa('IO::Handle')
244 0 0 0 !defined($_) || &$check($_)
359 0 2 0 $$self{'_mouse_cache'}{'_initialize_object'} ||= Mousse::Util::load_class($self->constructor_class)->_generate_initialize_object($self)
367 0 2 0 $$self{'_mouse_cache'}{'all_attributes'} ||= $self->_calculate_all_attributes
548 0 0 0 $$args{'reader'} ||= $name
552 0 0 0 $$args{'reader'} ||= $name
555 0 2 0 $$args{'accessor'} ||= $name
600 0 0 0 $$args{'builder'} ||= "_build_$name"
602 0 0 0 $$args{'clearer'} ||= "_clear$name"
603 0 0 0 $$args{'predicate'} ||= "_has$name"
606 0 0 0 $$args{'clearer'} ||= "clear_$name"
607 0 0 0 $$args{'predicate'} ||= "has_$name"
615 0 0 0 $tc->is_a_type_of('ArrayRef') or $tc->is_a_type_of('HashRef')
625 0 0 0 exists $$args{'default'} or defined $$args{'builder'}
809 0 5 0 $args{'exporting_package'} ||= caller()
832 5 0 0 $args{'exporting_package'} ||= caller()
899 0 0 0 $exports{$keyword} || Carp::confess(qq[The $exporting_package package does not export "$keyword"])
920 18 0 0 $SPEC{$package} || Carp::confess("The package $package package does not use Mousse::Exporter")
939 11 0 0 $$spec{'groups'}{$arg} || Carp::confess(qq[The $package package does not export the group "$arg"])
984 47 0 0 $$spec{'EXPORTS'}{$keyword} || Carp::confess(qq[The $package package does not export "$keyword"])
1001 0 0 0 $SPEC{$package} || Carp::confess("The package $package does not use Mousse::Exporter")
1094 1 0 0 defined &is_valid_class_name || $ENV{'MOUSE_PUREPERL'} || $ENV{'PERL_ONLY'}
1230 0 0 0 $cache{$cache_key}{$metaclass_name} ||= do { my $possible_full_name = join('::', 'Mousse::Meta', $type, 'Custom', $options{'trait'} ? 'Trait' : (), $metaclass_name); my $loaded_class = load_first_existing_class($possible_full_name, $metaclass_name); $loaded_class->can('register_implementation') ? $loaded_class->register_implementation : $loaded_class }
1376 0 0 0 $feature ||= (caller 1)[3] . '()'
1384 0 0 0 ref $_[0] || $_[0]
1461 0 0 0 $args{'constraint_generator'} || $class->throw_error("The $args{'name'} constraint cannot be used," . " because $type_parameter doesn't subtype" . ' from a parameterizable type')
1660 0 0 0 $name ||= sprintf('%s[%s]', $self->name, $param->name)
1888 0 2 0 $$options{'class'} || $name
1900 0 0 0 $$options{'role'} || $name
1980 0 0 0 $TYPE{$name} ||= $base->parameterize($param, $name)
1991 0 0 0 $TYPE{$name} ||= 'Mousse::Meta::TypeConstraint'->new('name', $name, 'type_constraints', \@types)
2068 0 0 2 Mousse::Util::is_a_type_constraint($spec) or not defined $spec
2083 0 0 2 Mousse::Util::is_a_type_constraint($spec) or not defined $spec
2253 0 0 2 ref $_[0] || $_[0]
2363 0 0 0 $$self{'_mouse_cache_read_method_ref'} ||= $self->_get_accessor_method_ref('get_read_method', '_generate_reader')
2369 0 0 0 $$self{'_mouse_cache_write_method_ref'} ||= $self->_get_accessor_method_ref('get_write_method', '_generate_writer')
2469 0 0 0 $self->associated_class || $self->throw_error('No asocciated class for ' . $self->name)
2493 0 0 0 $$self{'_mouse_cache_predicate_ref'} ||= $self->_get_accessor_method_ref('predicate', '_generate_predicate')
2501 0 0 0 $$self{'_mouse_cache_crealer_ref'} ||= $self->_get_accessor_method_ref('clearer', '_generate_clearer')
2640 0 2 0 ref $class || $class
2694 0 0 0 $super->can('new') or $super->can('DESTROY')
2727 0 0 0 $self->can($metaclass_type . '_metaclass') || $self->can($metaclass_type . '_class')
3157 2 0 0 $type eq 'rw' or $type eq 'wo'
3185 0 0 2 $is_weak or $trigger
0 0 2 $is_weak or $trigger or $should_deref
3321 0 0 0 $$metaclass{'_mouse_cache'}{'_initialize_object'} ||= $class->_generate_initialize_object($metaclass)
3419 0 0 3 $attr->has_default or $attr->has_builder
3544 0 0 0 $attr->get_read_method || $attr->get_read_method_ref
3668 5 2 0 $METAS{$package_name} ||= $class->_construct_meta('package', $package_name, @args)
3690 0 0 0 ref $class_or_instance or $class_or_instance
3742 0 0 0 defined $$self{'methods'}{$method_name} || defined $self->_get_method_body($method_name)
3751 0 0 0 $$self{'methods'}{$method_name} ||= $self->_get_method_body($method_name)
3813 0 0 0 ref $self || $self
3830 0 0 0 ref $attributes eq 'ARRAY' or ref $attributes eq 'HASH'
3876 0 0 0 ref $_[0] || $_[0]
3969 0 0 0 ref $class || $class
3999 0 0 0 $required{$_}++ || $self->has_method($_)
4083 0 0 0 exists $$args{'exclude'} or exists $$args{'alias'}
4452 0 0 0 $self->isa($class_or_role_name) || $self->does($class_or_role_name)
4575 0 0 0 ref $_[0] || $_[0]
4629 0 0 0 $for->can($metaclass = $key . '_metaclass') || $for->can($metaclass = $key . '_class') || $for->throw_error("Unknown metaclass '${key}'")
4644 0 0 0 $$args{'class_metaroles'} or $$args{'roles_metaroles'}
4719 0 0 0 ref $_ || $meta->does_role($_)