Condition Coverage

blib/lib/Mouse/Tiny.pm
Criterion Covered Total %
condition 44 402 10.9


and 3 conditions

line !l l&&!r l&&r condition
80 8 0 0 exists $pack->{'VERSION'} and defined *{$pack->{'VERSION'};}{'SCALAR'}
8 0 0 exists $pack->{'VERSION'} and defined *{$pack->{'VERSION'};}{'SCALAR'} and defined ${$$pack{'VERSION'};}
82 8 0 0 exists $pack->{'ISA'} and defined *{$pack->{'ISA'};}{'ARRAY'}
8 0 0 exists $pack->{'ISA'} and defined *{$pack->{'ISA'};}{'ARRAY'} and @{$pack->{'ISA'};} != 0
183 0 0 0 defined $value && ref \$value eq 'SCALAR'
188 0 0 0 defined $value && $value =~ /\A -? [0-9]+ \z/msx
346 0 0 0 &Scalar::Util::blessed($object) and $object->isa($class->name)
476 4 0 0 defined $instance and ref $value eq 'CODE'
535 0 0 0 ref $args->{'default'} and ref $args->{'default'} ne 'CODE'
542 4 0 0 $args->{'required'} and not $can_be_required
1009 0 0 0 ref $gv eq 'GLOB' and *{$gv;}{'CODE'} == $spec->{'EXPORTS'}{$keyword}
1104 0 0 0 $@ and $ENV{'MOUSE_XS'}
1227 0 0 0 defined $meta && $meta->does_role($role_name)
1233 0 0 0 &Scalar::Util::blessed($thing) || is_class_loaded($thing) and $thing->can('does')
1354 0 0 0 $i + 1 < $max and ref $_[$i + 1] eq 'HASH'
1414 0 0 0 exists $args{'longmess'} and not $args{'longmess'}
1490 0 0 0 &$parameterized_check($_) && &$my_check($_)
1502 6 40 0 defined $check and ref $check ne 'CODE'
1636 0 0 0 ref $value and defined &overload::StrVal
1650 0 0 0 not ref $other and $other eq '__ANON__'
1818 4 0 0 @_ == 1 and ref $_[0]
4 0 0 @_ == 2 and ref $_[1]
1839 0 4 0 $is_subtype and not $parent
1925 0 0 0 &Scalar::Util::blessed($_[0]) && Mouse::Util::does_role($_[0], $role)
1944 0 0 0 @_ == 1 && ref $_[0] eq 'ARRAY'
1964 0 0 0 @_ == 1 and ref $_[0] eq 'ARRAY'
1969 0 0 0 @_ == 1 && ref $_[0] eq 'ARRAY'
1975 0 0 0 defined $_[0] && !ref($_[0]) && exists $valid{$_[0]}
2233 0 0 0 defined $SUPER_PACKAGE and $SUPER_PACKAGE ne caller()
2357 4 0 0 @bad and $class ne 'Mouse::Meta::Attribute'
2462 0 0 0 exists $args->{$illegal} and exists $self->{$illegal}
2719 0 0 4 $mm and $mm == \&Mouse::Util::meta
2788 0 0 0 $self_lin_isa[0] eq $other_lin_isa[0] && $self_lin_isa[0]
2894 4 0 0 not $attr->{'associated_methods'} and ($attr->{'is'} || '') ne 'bare'
3153 0 0 0 &Scalar::Util::blessed($r) && $l->body == $r->body && $l->name eq $r->name && $l->package_name eq $r->package_name
3181 4 0 0 defined $constraint && $constraint->has_coercion && $attribute->should_coerce
3245 4 0 0 $attribute->is_lazy and $type ne 'wo'
3423 0 0 0 $attr->should_coerce && $type_constraint->has_coercion
3539 0 0 0 $class->can('BUILDARGS') and $class->can('BUILDARGS') != \&Mouse::Object::BUILDARGS
3592 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)
3609 0 0 0 ref $proxy && !&Scalar::Util::blessed($proxy)
3707 0 0 12 $package_name and not ref $package_name
3719 0 0 0 $package_name and not ref $package_name
3772 0 0 0 $code && !exists($foreign{Mouse::Util::get_code_package($code)})
3948 0 0 0 defined $roles and not $options{'in_application_to_instance'}
4132 0 0 0 $args->{'alias'} and not exists $$args{-'alias'}
4135 0 0 0 $args->{'excludes'} and not exists $$args{-'excludes'}
4261 0 0 0 defined $dstcode and $dstcode != $code
4406 0 0 0 $existing and $existing != $spec
4418 0 0 0 $existing and $existing != $code

or 2 conditions

line l !l condition
211 0 0 Mouse::Util::class_of($_[0]) || (return 0)
332 0 0 Mouse::Util::get_code_ref($class, 'BUILD') || (next)
418 0 0 $self->{'before_method_modifiers'}{$method_name} ||= []
424 0 0 $self->{'around_method_modifiers'}{$method_name} ||= []
430 0 0 $self->{'after_method_modifiers'}{$method_name} ||= []
436 0 0 $self->{'before_method_modifiers'}{$method_name} ||= []
440 0 0 $self->{'around_method_modifiers'}{$method_name} ||= []
444 0 0 $self->{'after_method_modifiers'}{$method_name} ||= []
751 0 0 Mouse::Util::get_code_ref($class, 'DEMOLISH') || (next)
771 0 0 Mouse::Util::get_code_ref($class, 'BUILD') || (next)
890 0 10 $args{'groups'}{'all'} ||= \@all
901 0 8 $args{'groups'}{'default'} ||= \@all
1095 0 0 eval sprintf("#line %d %s\n", '1095', $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('Mouse', \$VERSION);\n\t\t\tMouse::Util->import({ into => 'Mouse::Meta::Method::Constructor::XS' }, ':meta');\n\t\t\tMouse::Util->import({ into => 'Mouse::Meta::Method::Destructor::XS' }, ':meta');\n\t\t\tMouse::Util->import({ into => 'Mouse::Meta::Method::Accessor::XS' }, ':meta');\n\t\t\treturn 1;\n\t\t" || 0
1224 0 0 $meta || 'Mouse::Meta::Class'
1411 0 0 $args{'depth'} || 0
1553 0 0 $self->{'coercion_map'} ||= []
1859 0 0 $TYPE{$name}{'package_defined_in'} || 'Mouse::Util::TypeConstraints'
2272 0 4 $args{'base_class'} || 'Mouse::Object'
2273 0 4 $args{'metaclass'} || 'Mouse::Meta::Class'
2894 0 0 $attr->{'is'} || ''
4176 0 0 $meta || 'Mouse::Meta::Class'
4360 0 0 $self->{'methods'}{$method_name} || 0
4370 0 0 $self->{'composed_roles_by_method'}{$method_name} ||= []
4648 0 0 $args{'metaclass'} || 'Mouse::Meta::Role'

or 3 conditions

line l !l&&r !l&&!r condition
61 0 0 8 ref $class or not defined $class
0 0 8 ref $class or not defined $class or not length $class
87 0 8 4 ref $entry ne 'GLOB' or defined *{$entry;}{'CODE'}
194 0 0 0 ref $value eq 'SCALAR' || ref $value eq 'REF'
204 0 0 0 &Scalar::Util::openhandle($value) || &Scalar::Util::blessed($value) && $value->isa('IO::Handle')
243 0 0 0 !defined($_) || &$check($_)
359 0 4 0 $self->{'_mouse_cache'}{'_initialize_object'} ||= Mouse::Util::load_class($self->constructor_class)->_generate_initialize_object($self)
367 0 4 0 $self->{'_mouse_cache'}{'all_attributes'} ||= $self->_calculate_all_attributes
552 0 0 0 $args->{'reader'} ||= $name
556 0 0 0 $args->{'reader'} ||= $name
559 0 4 0 $args->{'accessor'} ||= $name
604 0 0 0 $args->{'builder'} ||= "_build_$name"
606 0 0 0 $args->{'clearer'} ||= "_clear$name"
607 0 0 0 $args->{'predicate'} ||= "_has$name"
610 0 0 0 $args->{'clearer'} ||= "clear_$name"
611 0 0 0 $args->{'predicate'} ||= "has_$name"
619 0 0 0 $tc->is_a_type_of('ArrayRef') or $tc->is_a_type_of('HashRef')
630 0 0 0 exists $args->{'default'} or defined $args->{'builder'}
805 0 10 0 $args{'exporting_package'} ||= caller()
828 10 0 0 $args{'exporting_package'} ||= caller()
895 0 0 0 $exports{$keyword} || Carp::confess(qq[The $exporting_package package does not export "$keyword"])
916 36 0 0 $SPEC{$package} || Carp::confess("The package $package package does not use Mouse::Exporter")
935 22 0 0 $spec->{'groups'}{$arg} || Carp::confess(qq[The $package package does not export the group "$arg"])
978 94 0 0 $spec->{'EXPORTS'}{$keyword} || Carp::confess(qq[The $package package does not export "$keyword"])
994 0 0 0 $SPEC{$package} || Carp::confess("The package $package does not use Mouse::Exporter")
1087 0 0 0 defined &Mouse::Util::is_valid_class_name || $ENV{'MOUSE_PUREPERL'} || $ENV{'PERL_ONLY'}
1233 0 0 0 &Scalar::Util::blessed($thing) || is_class_loaded($thing)
1249 0 0 0 $cache{$cache_key}{$metaclass_name} ||= do { my $possible_full_name = join('::', 'Mouse::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 }
1395 0 0 0 $feature ||= (caller 1)[3] . '()'
1403 0 0 0 ref $_[0] || $_[0]
1482 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')
1678 0 0 0 $name ||= sprintf('%s[%s]', $self->name, $param->name)
1907 0 4 0 $options->{'class'} || $name
1919 0 0 0 $options->{'role'} || $name
2004 0 0 0 $TYPE{$name} ||= $base->parameterize($param, $name)
2015 0 0 0 $TYPE{$name} ||= 'Mouse::Meta::TypeConstraint'->new('name', $name, 'type_constraints', \@types)
2092 0 0 4 Mouse::Util::is_a_type_constraint($spec) or not defined $spec
2107 0 0 4 Mouse::Util::is_a_type_constraint($spec) or not defined $spec
2278 0 0 4 ref $_[0] || $_[0]
2390 0 0 0 $self->{'_mouse_cache_read_method_ref'} ||= $self->_get_accessor_method_ref('get_read_method', '_generate_reader')
2396 0 0 0 $self->{'_mouse_cache_write_method_ref'} ||= $self->_get_accessor_method_ref('get_write_method', '_generate_writer')
2495 0 0 0 $self->associated_class || $self->throw_error('No asocciated class for ' . $self->name)
2520 0 0 0 $self->{'_mouse_cache_predicate_ref'} ||= $self->_get_accessor_method_ref('predicate', '_generate_predicate')
2528 0 0 0 $self->{'_mouse_cache_crealer_ref'} ||= $self->_get_accessor_method_ref('clearer', '_generate_clearer')
2666 0 4 0 ref $class || $class
2720 0 0 0 $super->can('new') or $super->can('DESTROY')
2753 0 0 0 $self->can($metaclass_type . '_metaclass') || $self->can($metaclass_type . '_class')
3195 4 0 0 $type eq 'rw' or $type eq 'wo'
3223 0 0 4 $is_weak or $trigger
0 0 4 $is_weak or $trigger or $should_deref
3362 0 0 0 $metaclass->{'_mouse_cache'}{'_initialize_object'} ||= $class->_generate_initialize_object($metaclass)
3459 0 0 4 $attr->has_default or $attr->has_builder
3585 0 0 0 $attr->get_read_method || $attr->get_read_method_ref
3710 8 4 0 $METAS{$package_name} ||= $class->_construct_meta('package', $package_name, @args)
3732 0 0 0 ref $class_or_instance or $class_or_instance
3784 0 0 0 defined $self->{'methods'}{$method_name} || defined $self->_get_method_body($method_name)
3793 0 0 0 $self->{'methods'}{$method_name} ||= $self->_get_method_body($method_name)
3855 0 0 0 ref $self || $self
3872 0 0 0 ref $attributes eq 'ARRAY' or ref $attributes eq 'HASH'
3918 0 0 0 ref $_[0] || $_[0]
4012 0 0 0 ref $class || $class
4042 0 0 0 $required{$_}++ || $self->has_method($_)
4127 0 0 0 exists $args->{'exclude'} or exists $args->{'alias'}
4529 0 0 0 $self->isa($class_or_role_name) || $self->does($class_or_role_name)
4653 0 0 0 ref $_[0] || $_[0]
4708 0 0 0 $for->can($metaclass = $key . '_metaclass') || $for->can($metaclass = $key . '_class') || $for->throw_error("Unknown metaclass '${key}'")
4723 0 0 0 $args->{'class_metaroles'} or $args->{'roles_metaroles'}
4799 0 0 0 ref $_ || $meta->does_role($_)