Branch Coverage

blib/lib/Moose/Exporter.pm
Criterion Covered Total %
branch 93 120 77.5


line true false branch
85 0 1071 unless $args{'install'}
89 1063 2148 unless $methods{$to_install} and not $package->has_package_symbol($symbol)
112 702 2924 unless $meta
123 455 37645 if not ref $as and $meta->has_package_symbol("&" . $as) and $meta->get_package_symbol("&" . $as) == $cv
128 37645 1 unless ref $as
136 243 5379 unless exists $installed{$name}
163 1 2261 unless (exists $EXPORT_SPEC{$package})
173 2174 87 unless defined $also
175 61 26 ref $also ? :
191 1088 45 unless @$also_list and @$existing_stack
195 86 2 unless $also_member eq $stack_member
216 2 1 if (ref $alias) { }
217 1 1 unless &reftype($alias) eq "ARRAY"
244 0 1110 unless my $args = $EXPORT_SPEC{$package}
254 0 5388 unless my $sub = $class->_sub_from_package($package, $name)
264 5388 0 unless exists $exports{$name}
268 0 0 unless my $sub = $class->_sub_from_package($package, $name)
277 0 0 unless exists $exports{$name}
286 2 10261 if (ref $name) { }
1346 8915 elsif ($name =~ /^(.*)::([^:]+)$/) { }
293 0 2 if ($coderef_pkg ne $package)
298 0 1346 unless $sub = $class->_sub_from_package("$1", "$2")
303 1346 0 if ($1 ne $package)
308 0 8915 unless $sub = $class->_sub_from_package($package, $name)
317 10263 0 unless exists $exports{$coderef_name}
334 15649 0 if defined &$sub
398 0 0 if (my $proto = prototype $sub)
421 1 22477 if (my $proto = prototype $sub)
453 9 3621 if defined $metaclass and length $metaclass
503 39 3590 if ($did_init_meta and @{$traits;}) { }
2 3588 elsif (@{$traits;}) { }
518 0 3626 if ref $args[0] eq "HASH"
521 3626 0 unless ($extra->{'into'})
534 55 132 if (($_[$i] || '') eq $option_name)
544 3610 20 ref $traits ? :
564 704 2925 unless $meta
566 9 2916 if keys %$metaroles
571 2 1563 if $meta->isa("Class::MOP::Class") and $base_class_roles and @$base_class_roles
600 8 3636 if (exists $data->{'class_metaroles'})
607 3 3641 if (exists $data->{'role_metaroles'})
614 3 3641 if (exists $data->{'base_class_roles'})
619 0 29152 if (exists $data->{$type})
627 8 3621 keys %class_metaroles ? :
3 3626 keys %role_metaroles ? :
3 3626 @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 0 4249 ref $_[1] && defined $_[1]{'into_level'} ? :
0 4249 ref $_[1] && defined $_[1]{'into'} ? :
715 8767 12 if (defined &{$package . "::" . $name;})
719 0 8767 unless $recorded_exports->{$sub}
721 1125 7642 if ($is_reexport->{$name})
725 99 1026 unless _export_is_flagged(\*{join "::", $package, $name;})
758 0 8568 if exists $args->{$role}
763 2 1069 if exists $args->{'base_class_roles'}
768 1063 0 unless %new_style_roles or %old_style_roles or %base_class_roles