Branch Coverage

blib/lib/Moose/Exporter.pm
Criterion Covered Total %
branch 104 120 86.6


line true false branch
85 0 1118 unless $args{'install'}
89 1108 2244 unless $methods{$to_install} and not $package->has_package_symbol($symbol)
112 718 2979 unless $meta
123 455 38284 if not ref $as and $meta->has_package_symbol("&" . $as) and $meta->get_package_symbol("&" . $as) == $cv
128 38284 1 unless ref $as
136 243 5481 unless exists $installed{$name}
163 3 2405 unless (exists $EXPORT_SPEC{$package})
173 2271 134 unless defined $also
175 90 44 ref $also ? :
191 1137 70 unless @$also_list and @$existing_stack
195 119 3 unless $also_member eq $stack_member
216 2 1 if (ref $alias) { }
217 1 1 unless &reftype($alias) eq "ARRAY"
244 0 1180 unless my $args = $EXPORT_SPEC{$package}
254 1 5658 unless my $sub = $class->_sub_from_package($package, $name)
264 5641 17 unless exists $exports{$name}
268 0 2 unless my $sub = $class->_sub_from_package($package, $name)
277 2 0 unless exists $exports{$name}
286 3 10590 if (ref $name) { }
1405 9185 elsif ($name =~ /^(.*)::([^:]+)$/) { }
293 1 2 if ($coderef_pkg ne $package)
298 0 1405 unless $sub = $class->_sub_from_package("$1", "$2")
303 1405 0 if ($1 ne $package)
308 0 9185 unless $sub = $class->_sub_from_package($package, $name)
317 10593 0 unless exists $exports{$coderef_name}
334 16250 1 if defined &$sub
398 1 1 if (my $proto = prototype $sub)
421 2 22897 if (my $proto = prototype $sub)
453 9 3694 if defined $metaclass and length $metaclass
503 39 3661 if ($did_init_meta and @{$traits;}) { }
2 3659 elsif (@{$traits;}) { }
518 1 3696 if ref $args[0] eq "HASH"
521 3697 0 unless ($extra->{'into'})
534 55 135 if (($_[$i] || '') eq $option_name)
544 3683 20 ref $traits ? :
564 720 2980 unless $meta
566 9 2971 if keys %$metaroles
571 3 1611 if $meta->isa("Class::MOP::Class") and $base_class_roles and @$base_class_roles
600 8 3727 if (exists $data->{'class_metaroles'})
607 3 3732 if (exists $data->{'role_metaroles'})
614 4 3731 if (exists $data->{'base_class_roles'})
619 0 29880 if (exists $data->{$type})
627 8 3692 keys %class_metaroles ? :
3 3697 keys %role_metaroles ? :
4 3696 @base_class_roles ? :
643 0 39 unless @{$traits;}
647 38 0 $meta->isa('Class::MOP::Class') ? :
1 38 $meta->isa('Moose::Meta::Role') ? :
654 2 40 ref $_ ? :
659 0 39 unless @resolved_traits
663 1 38 if ($meta->isa('Moose::Meta::Role')) { }
683 2 4329 ref $_[1] && defined $_[1]{'into_level'} ? :
0 4331 ref $_[1] && defined $_[1]{'into'} ? :
715 8888 12 if (defined &{$package . "::" . $name;})
719 0 8888 unless $recorded_exports->{$sub}
721 1145 7743 if ($is_reexport->{$name})
725 99 1046 unless _export_is_flagged(\*{join "::", $package, $name;})
758 0 8944 if exists $args->{$role}
763 3 1115 if exists $args->{'base_class_roles'}
768 1108 1 unless %new_style_roles or %old_style_roles or %base_class_roles