Branch Coverage

blib/lib/Exporter/Extensible.pm
Criterion Covered Total %
branch 189 294 64.2


line true false branch
56 103 3 unless ref $self
59 55 51 if ref $_[0] eq "HASH"
62 12 2 unless $self->exporter_get_tag("default")
92 14 @_ ? :
63 12 94 unless @todo
71 11 4 if ($replace eq 'carp') { }
2 2 elsif ($replace eq 1) { }
75 0 0 unless *{$prefix . $_;}{"CODE"} == $fastsub->{$_}
101 9 94 if (ref $flat_install[$i] eq "HASH")
108 1 84 if (my $scope = $self->{'scope'})
128 13 127 if (ord $symbol == $colon)
130 0 13 unless my $tag_cache = $self->exporter_get_tag($name)
134 1 12 if (ref $tag_cache->[0] eq "HASH" or ref $todo->[0] eq "HASH")
137 0 1 if ref $tag_cache->[0] eq "HASH"
139 1 0 if ref $todo->[0] eq "HASH"
141 1 0 if ($self != $self2)
151 69 58 exists $inventory->{$symbol} ? :
0 127 unless my $ref = exists $inventory->{$symbol} ? $inventory->{$symbol} : $self->exporter_get_inherited($symbol)
155 40 87 if (ord $symbol == $hyphen) { }
157 40 0 if (ref $ref eq "ARRAY")
164 31 56 $ord_is_sigil{ord $symbol} ? :
167 9 78 if ref $todo->[0] eq "HASH"
169 33 54 if ($self2->{'_name_mangle'})
170 10 23 if defined $self2->{'not'} and $self2->_exporter_is_excluded($symbol)
173 5 11 unless defined $self2->{'prefix'} or defined $self2->{'suffix'} or defined $self2->{'not'}
177 30 46 $sigil ? :
5 72 if (not ref $ref or ref $ref eq ($sigil ? "CODE" : "REF"))
180 4 1 ref $ref eq 'REF' ? :
181 2 3 if ref $method eq "SCALAR"
187 0 0 unless ref $ref eq $sigil_to_reftype{$sigil} or ref $ref eq "REF" and $sigil eq "\$"
192 0 77 if ($install->{$name}) { }
9 68 elsif (ref $ref eq 'HASH') { }
193 0 0 if ($install->{$name} != $ref)
194 0 0 if (ref $ref eq "GLOB" or ref $install->{$name} eq "GLOB")
198 0 0 unless ref $ref eq "GLOB" and ref $install->{'dest'} eq "GLOB" and *{$install->{$name};} eq *$ref
202 0 0 unless ref $install->{$name} eq "HASH"
204 0 0 unless ($install->{$name}{ref $ref} ||= $ref) == $ref
222 1 0 if $self->[1]
232 0 80 unless my $into = $self->{'into'}
233 2 78 if ref $into
236 78 0 @_ == 1 && ref $_[0] eq 'ARRAY' ? :
242 19 46 if (defined $stash->{$name} and $replace ne 1)
247 1 18 ref $ref eq 'SCALAR' ? :
0 19 ref $ref eq 'GLOB' ? :
248 4 15 if ($conflict)
249 1 3 if $replace eq "skip"
251 1 2 $replace eq 'warn' ? :
261 0 8 unless my $into = $self->{'into'}
262 1 7 if ref $into
264 7 0 @_ == 1 && ref $_[0] eq 'ARRAY' ? :
269 1 8 if (ref $ref eq 'GLOB') { }
271 0 1 unless *$ref eq ($stash->{$name} || '')
277 0 8 unless $ref == (*{$pkg_dest;}{ref $ref} || 0)
289 0 3 unless ref $into eq "HASH"
291 3 0 @_ == 1 && ref $_[0] eq 'ARRAY' ? :
295 1 5 if ($self->{'no'}) { }
299 0 5 if (defined $into->{$name} and $into->{'name'} != $ref)
300 0 0 if $replace eq "skip"
301 0 0 if $replace eq "warn"
302 0 0 if $replace eq "die"
309 4 0 if @_ > 1
310 3 0 if @_ > 1
311 6 0 if @_ > 1
312 7 0 if @_ > 1
313 50 0 if @_ > 1
314 1 0 if @_ > 1
315 5 0 if @_ > 1
316 0 0 if @_ > 1
344 11 0 if @_ > 1
352 0 0 unless my $setter = $self->can("exporter_config_" . $k) or substr($k, 0, 1) eq "-" and $self->can("exporter_config_" . substr($k, 1))
364 5 4 if (@for_global_config == 1 and $for_global_config[0] eq "-as" and keys %$conf == 1)
371 0 6 unless my $setter = $self2->can("exporter_config_" . substr($k, 1))
377 2 4 if (@for_global_config < scalar keys %$conf)
386 2 5 ref $_[1] eq 'HASH' ? :
393 15 24 ref $_[0] eq 'HASH' ? :
399 0 4 unless $ref ||= $class->_exporter_get_ref_to_package_var($export_name)
438 6 39 unless $count
439 5 34 if ($count eq '*') { }
4 30 elsif ($count eq '?') { }
442 0 4 unless $consumed =~ /^[0-9]+$/
448 1 2 if (ref $_[0]{'todo'}[0]) { }
450 1 0 ref $arg eq 'HASH' ? :
467 0 11 unless not ref $method or ref $method eq "CODE"
470 0 11 if (ord $export_name == $colon) { }
471 0 0 unless (${$class . "::EXPORT_TAGS";}{substr $export_name, 1} ||= $method) eq $method
477 0 11 ref $method && !$ord_is_sigil{ord $export_name} ? :
498 27 25 unless my $add = do { $_ . '::EXPORT_TAGS' }->{$tagname} || $tagname eq 'all' && defined *{$_ . '::EXPORT';}{'HASH'} && [grep((!$ord_is_directive{ord $_}), keys %{$_ . '::EXPORT';})]
502 1 24 if (ref $add ne "ARRAY")
504 1 0 ref $add eq 'SCALAR' ? :
0 1 ref $add eq 'CODE' ? :
508 0 1 unless ref $add eq "ARRAY"
513 0 25 @$add && !defined($add->[0]) ? :
518 0 25 if $start
520 14 12 $known ? :
521 25 1 unless $dynamic
531 26 0 unless $list or exists $EXPORT_TAGS_PKG_CACHE{$class}{$tagname}
537 0 20 unless ref $self and my $not = $self->{'not'}
540 4 16 ref $not eq 'ARRAY' ? :
541 8 14 if (not ref $filter) { }
6 8 elsif (ref $filter eq 'Regexp') { }
8 0 elsif (ref $filter eq 'CODE') { }
542 2 6 if $symbol eq $filter
545 4 2 if $symbol =~ /$filter/
562 0 3 unless ref $self and $self->{'todo'}
570 0 0 unless $method_attrs{$class}{$coderef}
0 0 $super ? :
577 0 20 $super ? :
583 0 0 unless &Sub::Identify::sub_name
586 0 0 eval 'require Sub::Identify;1' ? :
590 0 17 unless $cv->isa("B::CV") and not $cv->GV->isa("B::SPECIAL") and $cv->GV->NAME
0 0 unless $cv->isa("B::CV") and not $cv->GV->isa("B::SPECIAL") and $cv->GV->NAME
600 0 9 unless (defined $name)
601 0 0 unless ($sigil, $name) = $_[1] =~ /^([\$\@\%\*\&]?)(\w+)$/
605 0 9 unless do { $class . "::" }->{$name}
606 1 8 $reftype eq 'GLOB' ? :
611 21 0 if ($attr =~ /^Export(?:\(\s*(.*?)\s*\))?$/)
614 16 5 $1 ? :
615 7 17 if ($token =~ /^:(.*)$/) { }
6 11 elsif ($token =~ /^\w+$/) { }
4 7 elsif ($token =~ /^-(\w*)(?:\(([0-9]+|\*|\?)\))?$/) { }
7 0 elsif (my($sym, $name) = $token =~ /^=([\&\$\@\%\*:]?(\w*))$/) { }
624 0 4 length $1 ? :
629 3 4 length $name ? :
641 6 15 unless (@export_names)
656 5 23 if ($version == 1) { }
0 23 elsif ($version) { }
663 0 5 if ref $tags->{'default'} eq "ARRAY"
682 0 24 if ref $export
684 2 22 ref $_[$i] ? :
686 9 15 if ($export =~ /^\w+$/) { }
13 2 elsif (($is_gen, $sigil, $name) = $export =~ /^(=?)([\$\@\%\*]?)(\w+)$/) { }
1 1 elsif (($is_gen, $name) = $export =~ /^(=?):(\w+)$/) { }
1 0 elsif (($name, $args) = $export =~ /^-(\w+)(?:\(([0-9]+|\*|\?)\))?$/) { }
687 0 9 if ($ref) { }
688 0 0 unless ref $ref eq "CODE"
690 0 9 unless $ref = $class->can($export)
696 4 9 if ($is_gen) { }
697 1 3 if ($ref) { }
700 1 0 if ref $ref eq "SCALAR"
705 3 2 if ($class->can($method))
715 0 5 unless ref $ref eq $sigil_to_reftype{$sigil} or ref $ref eq "REF" and $sigil eq "\$"
722 0 1 if ($is_gen and not $ref)
724 0 0 unless $class->can($gen)
728 1 0 ref $ref eq 'ARRAY' ? :
733 0 1 if ($ref) { }
734 0 0 unless ref $ref eq "CODE" or ref $ref eq "SCALAR" and $class->can($ref = $$ref)
737 0 1 unless $class->can($name)