Condition Coverage

blib/lib/Moose/Meta/Attribute.pm
Criterion Covered Total %
condition 112 166 67.4


and 3 conditions

line !l l&&!r l&&r condition
143 196 9 2 $traits->[$i] and ref $traits->[$i]
207 177 3 8 exists $options{$_} && exists $self->{$_}
338 1947 0 84 &blessed($options->{'isa'}) and $options->{'isa'}->can("has_coercion")
355 2695 1 18 exists $options->{'does'} and not exists $options->{'isa'}
358 17 0 1 &blessed($options->{'does'}) and $options->{'does'}->can("has_coercion")
462 1695 973 1 $options->{'required'} and not !exists $options->{'init_arg'} || defined $options->{'init_arg'} || exists $options->{'default'} || defined $options->{'builder'}
483 4 4239 1939 defined $init_arg and exists $params->{$init_arg}
492 3875 6 56 $self->is_required and not $self->has_default
3881 4 52 $self->is_required and not $self->has_default and not $self->has_builder
521 685 2560 47 ref $val and $self->is_weak_ref
555 52 0 1 $self->is_required and not @args
571 50 1 1 $self->has_trigger and $self->has_value($instance)
577 52 0 0 ref $value and $self->is_weak_ref
679 4307 0 146 $self->should_coerce and $self->type_constraint->has_coercion
802 4232 9 2 $self->has_initializer and $self->is_lazy
837 2 0 1 ref $value and $self->is_weak_ref
843 70 0 1 $self->should_auto_deref and not $for_trigger
1042 2835 2 377 $method and $method->isa("Class::MOP::Method::Accessor")
1056 0 0 377 $generate_as_inline_methods and not $method->is_inline
0 0 377 $method->associated_attribute->name eq $self->name and ($generate_as_inline_methods and not $method->is_inline)
1075 0 0 0 defined $method_context->{'file'} and $method_context->{'line'}
1091 0 0 0 defined $self_context->{'file'} and $self_context->{'line'}
1098 2835 0 379 $method and not $method->is_stub
2835 377 2 $method and not $method->is_stub and not $method->isa("Class::MOP::Method::Accessor")
377 2 0 $method and not $method->is_stub and not $method->isa("Class::MOP::Method::Accessor") and !$self->definition_context || $method->package_name eq $self->definition_context->{'package'}
1111 379 2835 0 not $self->associated_class->has_method($accessor) and $self->associated_class->has_package_symbol("&" . $accessor)
1163 3 1079 33 $class_name->isa("Moose::Object") and $handle =~ /^BUILD|DEMOLISH$/ || 'Moose::Object'->can($handle)
1191 2 1 1 &blessed($handles) and $handles->isa("Moose::Meta::TypeConstraint::DuckType")
2 0 1 &blessed($handles) and $handles->isa("Moose::Meta::TypeConstraint::Role")
1222 0 2 4 &blessed($role_meta) and $role_meta->isa("Moose::Meta::Role")
1315 3931 0 116 $self->should_coerce and $self->type_constraint->has_coercion

or 2 conditions

line l !l condition
52 4055 0 $throw_args || ''
77 1 0 $options{'definition_context'}{'context'} || 'attribute constructor'
78 1 0 $options{'definition_context'}{'type'} || 'class'
592 2557 1048 $tc ||= "\$type_constraint"
593 2557 1048 $coercion ||= "\$type_coercion"
594 2557 1048 $message ||= "\$type_message"
876 0 2961 $tc ||= "\$type_constraint"
877 0 2961 $coercion ||= "\$type_coercion"
878 0 2961 $message ||= "\$type_message"
1021 27 2 $self->_is_metadata || ''
1039 0 3214 ref $accessor || ''

or 3 conditions

line l !l&&r !l&&!r condition
111 31 2307 0 ref $class || $class
135 207 0 0 Moose::Util::resolve_metatrait_alias('Attribute', $trait) || $trait
239 31 0 0 delete $params{'metaclass'} || ref $self
291 2 1885 0 $options->{'reader'} ||= $name
296 0 1 0 $options->{'reader'} ||= $name
419 8 3 1 $options->{'type_constraint'}->is_a_type_of("ArrayRef") or $options->{'type_constraint'}->is_a_type_of("HashRef")
436 0 23 0 $options->{'builder'} ||= "_build_$name"
439 0 1 0 $options->{'clearer'} ||= "_clear$name"
440 0 1 0 $options->{'predicate'} ||= "_has$name"
443 0 22 0 $options->{'clearer'} ||= "clear_$name"
444 0 22 0 $options->{'predicate'} ||= "has_$name"
454 62 459 2 exists $options->{'default'} or defined $options->{'builder'}
462 0 0 1 !exists $options->{'init_arg'} || defined $options->{'init_arg'} || exists $options->{'default'} || defined $options->{'builder'}
905 197 463 0 $self->has_default or $self->has_builder
1021 2260 27 2 @{$self->associated_methods;} or ($self->_is_metadata || '') eq "bare"
1098 0 0 2 !$self->definition_context || $method->package_name eq $self->definition_context->{'package'}
1163 4 29 1079 $handle =~ /^BUILD|DEMOLISH$/ || 'Moose::Object'->can($handle)