Branch Coverage

blib/lib/Moose/Meta/Class.pm
Criterion Covered Total %
branch 108 126 85.7


line true false branch
60 2775 0 if @args % 2
76 700 1 if @args % 2 == 1
81 579 122 if exists $options{'roles'}
88 577 120 if ($roles)
110 8 13 unless not ref $_[0]
117 7 2723 if $params
119 22 2708 &blessed($role) ? :
121 7 2723 if ($params and %$params)
128 2 5 unless ref $excludes eq "ARRAY"
130 0 7 if (%$params)
159 96 10 &blessed($pkg) ? :
162 106 0 if ($meta)
182 3 1100 unless &blessed($role) and $role->isa("Moose::Meta::Role")
198 1 1099 unless &blessed($application) and $application->isa("Moose::Meta::Role::Application::ToClass")
217 131 1056 Class::MOP::class_of($_)->can('roles') ? :
226 45 144 Class::MOP::class_of($_)->can('calculate_all_roles') ? :
235 2 487 unless defined $role_name
244 278 668 unless $meta and $meta->can("roles")
246 359 100 if $role->does_role($role_name)
255 1 1129 unless defined $role_name
264 8272 2193 unless $meta and $meta->can("roles")
266 6 110 if $role->excludes_role($role_name)
274 3725 39 @_ == 1 ? :
279 2460 312 if $object->can("BUILDALL")
289 12786 51 unless $attr->can("has_trigger") and $attr->has_trigger
292 0 51 unless defined $init_arg
293 33 18 unless exists $params->{$init_arg}
300 1 17 $attr->should_coerce ? :
328 760 2 if ($args eq '@_' and !$buildargs || $buildargs->body == \&Moose::Object::BUILDARGS) { }
376 9 2492 unless defined $attr->init_arg
377 1554 938 unless $attr->can("is_required") and $attr->is_required
378 13 925 if $attr->has_default or $attr->has_builder
413 3 2490 if $attr->has_initializer
427 1279 1223 if $attr->can("is_lazy") and $attr->is_lazy
429 1082 141 unless $default
443 0 141 if $attr->has_initializer
469 2489 13 unless $attr->can("has_trigger") and $attr->has_trigger
472 0 13 unless defined $init_arg
490 137 625 unless @methods
512 13 2489 $_->can('has_trigger') && $_->has_trigger ? :
526 2464 38 $_->can('type_constraint') ? :
530 2426 76 defined $_ ? :
534 14 2488 defined $_ && $_->has_coercion ? :
540 0 2426 $_->has_message ? :
2426 76 defined $_ ? :
547 2501 0 if defined $_
554 3 760 &any(sub {
2426 76 defined $_ ? :
571 2 3165 if $meta and $meta->isa("Moose::Meta::Role")
581 672 1704 &blessed($_[0]) && $_[0]->isa('Class::MOP::Attribute') ? :
588 2311 3 if ($attr->can("_check_associated_methods"))
598 2 1012 if $existing_method
613 2 14 if $existing_method
631 1 1 if &blessed($method->{'code'}) and not $method->{'code'}->isa("Moose::Meta::Method::Overridden")
655 0 35 if ($self->_class_metaclass_can_be_made_compatible($super_meta))
656 0 0 unless $self->is_pristine
676 0 124 if ($self->_single_metaclass_can_be_made_compatible($super_meta, $metaclass_type))
677 0 0 unless $self->is_pristine
705 0 0 if $weaken
711 0 1704 if scalar @args == 1 and ref $args[0] eq "HASH"
713 40 1664 if (($name || '') =~ /^\+(.*)/) { }
731 4 36 unless defined $inherited_attr
736 36 0 if ($inherited_attr->isa('Moose::Meta::Attribute')) { }