Branch Coverage

blib/lib/Util/Any.pm
Criterion Covered Total %
branch 158 186 84.9


line true false branch
28 17 75 unless @_
30 38 86 if &$f()
37 3777 4 $h{$_}++ == 0 ? :
43 34 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 ? :
99 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') { }
0 0 elsif ($import_module eq 'Perl6::Export::Attrs') { }
246 1 0 if ${$pkg . '::EXPORT_TAGS';}{'all'}
257 38 54 if (_any sub { ref $_; } , @$org_args) { }
261 48 9 $ref ? :
262 2 55 if ($ref eq 'ARRAY' and not @$import_setting)
274 11 84 if ($import_module) { }
275 10 1 if @arg or not @$org_args
277 4 80 if @arg
286 88 14 if (exists $$config{$kind}) { }
289 4 10 defined $import_setting ? :
297 0 3 if $@
309 0 5 if ref $$org_args[$i]
313 1 4 if $k =~ s/^(.+)::all$/$1|$1::\\w+/
316 0 4 unless @kinds
320 1 3 if (@all)
325 7 5 if ($plugin =~ /$regex\W/i or $plugin =~ /$regex$/i)
327 0 7 if $@
331 2 0 if ($all_regex and $plugin =~ /$all_regex\W/i || $plugin =~ /$all_regex$/i)
342 17 232 if (ref $want_func_definition eq 'HASH') { }
21 211 elsif (ref $want_func_definition eq 'ARRAY') { }
344 12 5 if exists $$want_func_definition{-'prefix'}
346 0 17 if exists $$want_func_definition{-'args'}
354 1 38 if ($k eq '-prefix') { }
1 37 elsif ($k eq '-args') { }
13 24 elsif (ref $v) { }
382 0 10 if ($import_module eq 'Perl6::Export::Attrs') { }
0 10 elsif ($import_module eq 'Exporter::Simple') { }
4 6 elsif ($import_module eq 'Exporter') { }
6 0 elsif ($import_module eq 'Sub::Exporter') { }
394 0 10 if $@
406 3 42 if ($flg eq '-perl6exportattrs') { }
8 34 elsif ($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') { }
432 1 41 if @unknown