Branch Coverage

blib/lib/Test/Moose/More.pm
Criterion Covered Total %
branch 133 152 87.5


line true false branch
93 202 385 if $THING_NAME
98 0 6 ref $thing ? :
0 6 &blessed($thing) ? :
379 6 !!$thing_meta ? :
122 31 50 unless ref $roles
132 42 0 if $^V gt v5.21.1
145 16 50 unless ref $roles
150 42 0 if $^V gt v5.21.1
165 54 67 $meta->isa('Moose::Meta::Role') ? :
234 4 21 unless my $mmeta = $meta->find_method_by_name($method)
247 1 4 unless $tb->ok($meta->can('definition_context'), "$name can definition_context()")
340 4 51 if not $meta
351 40 11 if $type eq 'Class'
436 166 25 unless $args{'-subtest'}
438 3 22 if "$args{'-subtest'}" eq '1'
455 1 3 $args{'anonymous'} ? :
4 49 if exists $args{'anonymous'}
459 2 2 $args{'sugar'} ? :
4 49 if exists $args{'sugar'}
462 47 6 unless $args{'metaclasses'}
475 21 32 if (exists $args{'does'})
477 7 46 if (exists $args{'does_not'})
481 12 41 if (exists $args{'methods'})
483 4 49 if (exists $args{'no_methods'})
490 0 12 unless &has_attribute_ok($thing, $name)
493 4 8 unless (not $opts)
496 2 2 if find_meta($thing)->isa('Moose::Meta::Role')
515 1 36 unless &is_class_ok($class)
521 19 17 if (exists $args{'isa'})
525 0 2 if (exists $args{'immutable'} and $args{'immutable'})
527 2 34 if (exists $args{'immutable'} and not $args{'immutable'})
531 2 34 if (exists $args{'class_metaroles'})
533 2 34 if (exists $args{'no_class_metaroles'})
536 0 2 if $args{'class_metaclasses'} and $args{'metaclasses'}
539 2 34 if exists $args{'class_metaclasses'}
554 1 9 unless &is_role_ok($role)
557 2 7 if defined $args{'required_methods'}
560 1 8 if defined $args{'before'}
562 1 8 if defined $args{'around'}
564 1 8 if defined $args{'after'}
568 2 7 if (exists $args{'role_metaroles'})
570 2 7 if (exists $args{'no_role_metaroles'})
574 0 2 if $args{'role_metaclasses'} and $args{'metaclasses'}
577 2 7 if exists $args{'role_metaclasses'}
581 1 8 $args{'-compose'} ? :
588 0 1 unless $args{'required_methods'}
594 0 1 unless $args{'required_methods'}
595 0 0 unless $args{'required_methods'}
1 0 defined $args{'methods'} ? :
599 0 1 unless $args{'does'}
617 1 40 unless &has_attribute_ok($thing, $name)
636 4 38 if $thing_opts{'does'}
642 42 0 unless not $THING_NAME
644 4 38 if keys %thing_opts
655 0 8 unless &has_attribute_ok($thing, $name)
664 22 28 if $att->isa('Moose::Meta::Role::Attribute')
677 2 4 delete $opts{'required'} ? :
6 16 if exists $opts{'required'}
682 2 4 delete $opts{'lazy'} ? :
6 16 if exists $opts{'lazy'}
687 2 4 delete $opts{'coerce'} ? :
6 16 if exists $opts{'coerce'}
692 4 18 if keys %opts
709 5 23 if (my $is = delete $opts{'is'})
710 0 5 if $is eq 'rw' and not exists $opts{'accessor'}
711 5 0 if $is eq 'ro' and not exists $opts{'reader'}
724 21 4 defined $value ? :
732 4 4 delete $opts{'required'} ? :
8 20 if exists $opts{'required'}
741 4 24 if (exists $opts{'init_arg'})
744 4 0 $opts{'init_arg'} ? :
751 7 4 delete $opts{'lazy'} ? :
11 17 if exists $opts{'lazy'}
756 2 4 delete $opts{'coerce'} ? :
6 22 if exists $opts{'coerce'}
762 2 3 unless ($att->meta->find_attribute_by_name($opt))