Branch Coverage

blib/lib/Util/Any.pm
Criterion Covered Total %
branch 155 180 86.1


line true false branch
28 17 75 unless @_
30 38 86 if &$f()
37 4479 4 $h{$_}++ == 0 ? :
43 32 90 if @_ and $_[0] =~ /^-[A-Z]\w+$/o
46 42 48 if (@_ > 1 and ref $_[-1] eq 'HASH')
49 31 11 unless %{$_[-1];}
52 82 8 if (not defined $opt{'plugin'}) { }
0 12 elsif ($opt{'plugin'} and $opt{'plugin'} ne 'eager') { }
58 7 83 if @_ == 1 and ref $_[0] eq 'HASH'
61 13 77 if ($pkg->can('_plugins'))
62 4 9 if ($opt{'plugin'} eq 'eager')
72 20 66 $_[0] =~ /^[-:]?all$/i ? :
86 4 @_ ? :
91 126 267 ref $class_config ? :
94 2 391 if ($evalerror = do { local $@; eval { do { my $path = $class; $path =~ s[::][/]go; require $path . '.pm'; $evalerror = $@ } }; $@ })
96 1 1 $opt->{'debug'} == 2 ? :
102 1 297 $opt->{'smart_rename'} ? :
59 298 $opt->{'prefix'} ? :
8 357 $opt->{'module_prefix'} && $module_prefix ? :
27 365 $kind_prefix ? :
105 66 326 if (ref $config_options eq 'HASH') { }
110 34 32 if (exists $$config_options{-'select'}) { }
1 31 elsif (exists $$config_options{-'except'}) { }
31 0 elsif (not @funcs) { }
111 0 34 if exists $$config_options{-'except'}
120 12 54 @$wanted_funcs ? :
121 83 47 if (ref(my $gen = $config_options->{$function}) eq 'CODE') { }
44 3 elsif (defined &{$class . '::' . $function;}) { }
123 6 77 if (exists $local_definition->{$function}) { }
131 76 1 if ($function ne '.') { }
144 42 284 ref $config_options eq 'ARRAY' ? :
159 29 358 if (%$local_definition) { }
339 19 elsif (@$funcs) { }
161 11 29 if exists $exported->{$func}
162 0 29 if %$want_funcs and not exists $want_funcs->{$func}
165 29 0 if (ref $def eq 'HASH') { }
168 15 14 if (do { no strict 'refs'; defined &{$class . '::' . $original_func;} })
169 0 0 ref $prefix eq 'CODE' ? :
0 0 $prefix ? :
15 0 $local_rename ? :
175 0 0 ref $def eq 'ARRAY' ? :
183 0 339 unless @$funcs
187 39 348 if %$want_funcs
188 102 285 if ($prefix or %$rename) { }
189 1 101 if (ref $prefix eq 'CODE') { }
204 4 5 if ($str =~ s/^(is_|has_|enable_|disable_|isnt_|have_|set_)//)
207 5 4 if (not $str =~ /^$kind/ || $str =~ /$kind$/) { }
219 211 107 if exists $tmp{$class}
234 92 3 if (@$org_args)
235 0 92 if ref $org_args->[0] and ref $org_args->[0] eq 'HASH'
237 20 72 if ($org_args->[0] =~ /^([:-])?all/i) { }
4 79 elsif ($opt->{'plugin'} eq 'lazy' and $pkg->can('_plugins')) { }
240 1 19 if $opt->{'plugin'} eq 'lazy' and $pkg->can('_plugins')
243 4 16 if ($inherit_all and $import_module)
244 1 3 if ($import_module eq 'Exporter' or $import_module eq 'Exporter::Simple') { }
3 0 elsif ($import_module eq 'Sub::Exporter') { }
246 1 0 if do { $pkg . '::EXPORT_TAGS' }->{'all'}
255 38 54 if (&_any(sub { ref $_; } , @$org_args)) { }
259 48 9 $ref ? :
260 2 55 if ($ref eq 'ARRAY' and not @$import_setting)
272 11 84 if ($import_module) { }
273 10 1 if @arg or not @$org_args
275 4 80 if @arg
284 88 14 if (exists $config->{$kind}) { }
287 4 10 defined $import_setting ? :
295 0 3 if $@
307 0 5 if ref $org_args->[$i]
311 1 4 if $k =~ s/^(.+)::all$/$1|$1::\\w+/
314 0 4 unless @kinds
318 1 3 if (@all)
323 7 5 if ($plugin =~ /$regex\W/i or $plugin =~ /$regex$/i)
325 0 7 if $@
329 2 0 if ($all_regex and $plugin =~ /$all_regex\W/i || $plugin =~ /$all_regex$/i)
340 17 232 if (ref $want_func_definition eq 'HASH') { }
21 211 elsif (ref $want_func_definition eq 'ARRAY') { }
343 12 5 if exists $$want_func_definition{-'prefix'}
345 0 17 if exists $$want_func_definition{-'args'}
352 1 38 if ($k eq '-prefix') { }
1 37 elsif ($k eq '-args') { }
13 24 elsif (ref $v) { }
380 0 10 if ($import_module eq 'Exporter::Simple') { }
4 6 elsif ($import_module eq 'Exporter') { }
6 0 elsif ($import_module eq 'Sub::Exporter') { }
390 0 10 if $@
402 8 34 if ($flg eq '-subexporter') { }
5 29 elsif ($flg eq '-exportersimple') { }
7 22 elsif ($flg eq '-exporter') { }
18 4 elsif ($flg eq '-base') { }
3 1 elsif ($flg eq '-pluggable') { }
424 1 38 if @unknown