Branch Coverage

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


line true false branch
60 2713 0 if @args % 2
76 695 1 if @args % 2 == 1
81 574 122 if exists $options{'roles'}
88 572 120 if ($roles)
110 6 13 unless not ref $_[0]
117 5 2721 if $params
119 22 2704 &blessed($role) ? :
121 5 2721 if ($params and %$params)
128 2 3 unless ref $excludes eq "ARRAY"
130 0 5 if (%$params)
159 95 10 &blessed($pkg) ? :
162 105 0 if ($meta)
182 3 1091 unless &blessed($role) and $role->isa("Moose::Meta::Role")
198 1 1090 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 485 unless defined $role_name
244 278 665 unless $meta and $meta->can("roles")
246 358 100 if $role->does_role($role_name)
255 1 1120 unless defined $role_name
264 8233 2178 unless $meta and $meta->can("roles")
266 6 110 if $role->excludes_role($role_name)
274 3711 39 @_ == 1 ? :
279 2449 309 if $object->can("BUILDALL")
289 12698 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 743 2 if ($args eq '@_' and !$buildargs || $buildargs->body == \&Moose::Object::BUILDARGS) { }
376 9 2479 unless defined $attr->init_arg
377 1546 933 unless $attr->can("is_required") and $attr->is_required
378 13 920 if $attr->has_default or $attr->has_builder
413 3 2477 if $attr->has_initializer
427 1271 1218 if $attr->can("is_lazy") and $attr->is_lazy
429 1077 141 unless $default
443 0 141 if $attr->has_initializer
469 2476 13 unless $attr->can("has_trigger") and $attr->has_trigger
472 0 13 unless defined $init_arg
490 126 619 unless @methods
512 13 2476 $_->can('has_trigger') && $_->has_trigger ? :
526 2451 38 $_->can('type_constraint') ? :
530 2413 76 defined $_ ? :
534 14 2475 defined $_ && $_->has_coercion ? :
540 0 2413 $_->has_message ? :
2413 76 defined $_ ? :
547 2488 0 if defined $_
554 3 743 &any(sub {
2413 76 defined $_ ? :
571 2 3102 if $meta and $meta->isa("Moose::Meta::Role")
581 671 1683 &blessed($_[0]) && $_[0]->isa('Class::MOP::Attribute') ? :
588 2289 3 if ($attr->can("_check_associated_methods"))
598 2 1010 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 1683 if scalar @args == 1 and ref $args[0] eq "HASH"
713 40 1643 if (($name || '') =~ /^\+(.*)/) { }
731 4 36 unless defined $inherited_attr
736 36 0 if ($inherited_attr->isa('Moose::Meta::Attribute')) { }