Branch Coverage

blib/lib/App/Framework/Lite.pm
Criterion Covered Total %
branch 394 718 54.8


line true false branch
1129 0 0 if (eval "require $mod")
1162 0 0 if ($AVAILABLE_MOD{$use})
1168 0 24 if $@
1205 0 21 if (exists $args{'specification'})
1220 16 5 unless ($callinfo_aref)
1261 21 0 unless ($$this{'name'})
1282 3 8 if ($type eq ':') { }
0 8 elsif ($type eq '::') { }
8 0 elsif ($type eq '+') { }
1284 0 3 if ($personality)
1288 0 3 if ($args)
1339 252 8520 if (exists $args{$field})
1361 2946 1797 if (not ref $$this{$field} or ref $$this{$field} eq 'SCALAR')
1436 26 0 if ($ok)
1453 0 57 if (exists $values{$key}) { }
1482 0 26 if (keys %args_clash)
1536 0 26 unless ($ok)
1574 0 26 if ($opts{'man'} or $opts{'help'})
1576 0 0 $opts{'man'} ? :
1580 1 25 if ($opts{'man-dev'})
1585 0 25 if ($opts{'pod'})
1590 0 25 if ($opts{'alf-debug'})
1594 0 25 if ($opts{'dbg-data'})
1599 0 25 if ($opts{'dbg-data-array'})
1605 0 25 if ($opts{'alf-info'})
1609 0 0 $EMBEDDED ? :
1614 0 25 if ($opts{'alf-embed'})
1632 6 19 if ($opts{'log'})
1714 14 12 if ($$this{'exit_type'} =~ /exit/i) { }
1721 11 1 if ($^S) { }
1764 1 6 $level eq 'man-dev' ? :
1770 0 7 if $level eq 'opt'
1771 0 7 if $level eq 'help'
1772 1 6 if $level =~ /^man/
1851 83 349 if defined $$options_href{$opt}
1881 83 349 if defined $$options_href{$opt}
1945 234 0 if (exists $$option_fields_href{$option_name})
1974 83 349 if defined $$options_href{$opt}
2004 83 349 if defined $$options_href{$opt}
2033 5 0 if (keys %$args_href)
2036 0 5 if (@names)
2041 0 0 if exists $$args_href{$name}
2171 0 89 if ($last_dest_type)
2175 15 74 if $dest_type
2178 22 67 if defined $default_val
2181 22 67 if defined $default_val
2182 0 89 if ($optional and not $arg_optional)
2240 9 16 if ($feature_args =~ /open\s*=\s*(out|in|no)/i)
2242 0 9 if ($1 =~ /out/i) { }
0 9 elsif ($1 =~ /in/i) { }
2276 25 14 if ($$arg_names_href{$name}{'type'} eq 'f')
2280 9 30 if ($$arg_names_href{$name}{'type'} eq 'd')
2289 6 33 if ($$arg_names_href{$name}{'dest_type'})
2292 6 0 if (defined $value)
2297 3 3 unless @values
2299 1 5 if ($open_in and $$arg_names_href{$name}{'type'} eq 'f')
2308 2 37 if ($$arg_names_href{$name}{'dest_type'} eq '*')
2310 2 0 if (not defined $value or scalar @$value == 0)
2312 1 1 if ($open_in and $$arg_names_href{$name}{'type'} eq 'f')
2340 13 35 if ($idx >= scalar @$argv_aref)
2343 2 11 if ($$arg_names_href{$name}{'dest_type'} ne '*' and not $arg_optional)
2349 1 45 unless $val
2352 36 9 if ($$arg_names_href{$name}{'direction'} eq 'i')
2357 28 8 if (not $arg_optional and $val) { }
2360 3 25 if ($$arg_names_href{$name}{'type'} eq 'f' and not -f $val)
2365 1 24 if ($$arg_names_href{$name}{'type'} eq 'd' and not -d $val)
2378 4 28 if ($open_in and $$arg_names_href{$name}{'type'} eq 'f')
2381 4 0 if ($fh) { }
2385 0 4 if ($$arg_names_href{$name}{'mode'} eq 'b')
2395 0 4 if ($$arg_names_href{$name}{'dest_type'}) { }
2413 17 24 if ($open_out)
2415 4 13 if ($$arg_names_href{$name}{'direction'} eq 'o' and $$arg_names_href{$name}{'type'} eq 'f')
2418 2 2 if ($$arg_names_href{$name}{'append'})
2424 4 0 if ($fh) { }
2428 0 4 if ($$arg_names_href{$name}{'mode'} eq 'b')
2442 0 0 $$arg_names_href{$name}{'append'} ? :
2534 67 0 if (exists $$arg_names_href{$arg_name})
2561 114 4 if defined $$args_href{$arg}
2593 57 2 if (defined $$args_href{$arg})
2633 0 26 if $$this{'debug'} >= 2
2640 0 822 if ref $fields{$field}
2642 0 822 if $$this{'debug'} >= 2
2647 13 809 if ($ix >= 0)
2649 0 13 if $$this{'debug'} >= 2
2658 13 0 if (defined $fields{$1}) { }
2669 0 13 if $$this{'debug'} >= 2
2674 13 13 if (keys %changed)
2679 0 26 if $$this{'debug'} >= 2
2702 57 2 if defined $$args_href{$arg}
2723 57 2 if defined $$args_href{$arg}
2756 10 49 if ($$args_names_href{$name}{'dest_type'})
2765 8 44 unless @args
2773 7 37 if $$args_names_href{$name}{'dest_type'}
2779 7 19 if ($dest_type)
2786 1 6 if ($arg =~ /[\*\?]/)
2789 1 0 if (@files)
2797 6 1 if ($arg)
2811 20 0 if ($dest_type) { }
2814 1 19 if ($arg =~ /[\*\?]/)
2817 1 0 if (@files)
2825 19 1 if ($arg)
2879 0 89 if ($arg_spec =~ /[\'\"](\w+)[\'\"]/)
2888 89 0 if ($spec =~ s/\=(.*)$//)
2895 15 74 if ($arg =~ /([\@\*])/i)
2901 89 0 if ($arg =~ /([sfd])/i)
2904 10 79 if ($arg_type eq 's') { }
59 20 elsif ($arg_type eq 'f') { }
20 0 elsif ($arg_type eq 'd') { }
2920 29 60 if ($arg =~ /(i|<)/i) { }
10 50 elsif ($arg =~ /a|>>/i) { }
20 30 elsif ($arg =~ /(o|>)/i) { }
2938 0 89 if ($arg =~ /\?/i)
2945 0 89 if ($arg =~ /b/i)
3024 38 0 if ($name) { }
3028 38 0 if (exists $$data_href{$name})
3037 0 0 if (@$data_aref)
3044 0 38 unless $data_ref
3046 16 22 wantarray ? :
3089 21 5 if (exists $stash{'DATA'})
3109 11 533 if ($line =~ /^\s*__DATA__/) { }
0 533 elsif ($line =~ /^\s*__END__/) { }
5 528 elsif ($line =~ /^\s*__#/) { }
3123 11 0 if ($line =~ /__DATA__\s*(\S+)/)
3161 47 379 if ($line =~ /^\s*\[(\w+)\]/) { }
363 16 elsif ($field) { }
3169 31 16 if $field
3182 16 5 if ($field)
3219 77 359 if defined $default_val
3273 7 40 if ($field eq 'options') { }
11 29 elsif ($field eq 'args') { }
3355 76 199 if ($line =~ /^\s*[\-\*\+]\s*([\'\"\w\|\=\%\@\+\{\:\,\}\-\_\>\<\*]+)\s+(.*?)\s*(\[default=([^\]]+)\]){0,1}\s*$/) { }
181 18 elsif ($spec) { }
3364 36 40 if (defined $new_default_val)
3370 58 18 if ($spec)
3391 18 0 if ($spec)
3457 208 228 if ($option_spec =~ s/^dev://i)
3464 84 352 if ($option_spec =~ /[\'\"](\w+)[\'\"]/)
3475 192 244 if ($spec =~ s/\=(.*)$//)
3482 84 352 if (@fields > 1)
3488 84 86 if $fld eq $field
3491 86 0 if $spec
3497 4 432 if ($arg =~ /([\@\%])/i)
3503 192 244 if ($arg =~ /([siof])/i)
3506 84 108 if ($arg_type eq 's') { }
106 2 elsif ($arg_type eq 'i') { }
2 0 elsif ($arg_type eq 'f') { }
0 0 elsif ($arg_type eq 'o') { }
3508 2 82 if ($dest_type eq '%') { }
3611 15 102 if ($$option_entry_href{'default'})
3617 4 113 if ($$option_entry_href{'dest_type'})
3622 21 96 if ($developer) { }
3629 48 48 unless $$option_entry_href{'developer'}
3634 0 7 unless (@$names_aref)
3659 1 6 if ($developer)
3674 15 102 if ($$option_entry_href{'default'})
3680 48 69 if $$option_entry_href{'developer'} and not $developer
3681 69 48 if ($show)
3683 21 48 if ($developer) { }
3693 4 65 if ($$option_entry_href{'dest_type'})
3697 2 2 if ($developer)
3700 1 1 if ($$option_entry_href{'dest_type'} eq '@') { }
1 0 elsif ($$option_entry_href{'dest_type'} eq '%') { }
3715 0 7 unless (@$names_aref)
3769 4 3 unless ($synopsis)
3784 8 2 if ($$arg_entry_href{'type'} eq 'f')
3788 2 8 if ($$arg_entry_href{'type'} eq 'd')
3793 10 0 if ($type)
3796 3 7 if ($$arg_entry_href{'direction'} eq 'o')
3804 2 8 if ($$arg_entry_href{'dest_type'})
3809 0 10 if ($$arg_entry_href{'optional'}) { }
3819 0 10 if $$arg_entry_href{'optional'}
3859 1 0 if ($new_required_href)
3865 0 3 if ($AVAILABLE_MOD{'File::Which'}) { }
3877 0 1 if ($throw)
3882 0 0 unless ($$required_href{$exe})
3888 0 0 if ($error)
3947 7 15 if (@args == 1) { }
2 13 elsif (@args == 2) { }
3953 2 0 if ($args[0] ne 'cmd') { }
3970 7 15 unless %args
3978 29 451 if exists $args{$key}
3985 0 15 if exists $args{$key}
3987 0 15 if keys %set
3992 0 15 unless $cmd
3996 0 15 if (defined $nice)
4021 0 15 if ($local{'dryrun'}) { }
4024 0 0 $timeout ? :
4031 4 11 if (defined $timeout) { }
4053 0 15 if ($throw and $rc)
4117 2 1 if defined $on_error
4136 0 0 if defined $progress
4152 6 39 if ($$logopts_href{'all'} or $$logopts_href{$type})
4172 15 0 unless ($args and $args =~ /\>/)
4201 2 9 if (defined $progress)
4252 0 4 unless $pid = open(my $proc, "$cmd $args |")
4262 10 0 if (defined $progress)
4268 0 10 if (time > $endtime)
4276 0 4 if $$this{'debug'}
4278 0 4 if ($@)
4281 0 0 if ($@ eq "timeout\n") { }
4283 0 0 if $$this{'debug'}
4289 0 0 if $$this{'debug'}
4297 0 4 if $$this{'debug'}
4316 0 15 if (defined $check_results)
4335 0 16 if ($on_error ne 'status')
4338 0 0 if ($on_error =~ /warn/i)
4377 4 14 if (ref $arg eq 'ARRAY') { }
0 14 elsif (ref $arg eq 'HASH') { }
1 13 elsif (ref $arg eq 'SCALAR') { }
13 0 elsif (not ref $arg) { }
4404 15 0 if ($logfile)
4407 2 13 unless ($$this{'_started'})
4412 0 15 unless open my $fh, ">>$logfile"
4418 0 15 if ($$this{'to_stdout'})
4473 2 0 if ($logfile)
4476 0 2 if ($$this{'mode'} eq 'append')
4481 0 2 unless open my $fh, "$mode$logfile"
4512 0 63 if $$this{'debug'}
4513 0 63 if $$this{'debug'}
4515 10 53 $_to_expand ? :
4516 53 10 unless ($_state_href)
4529 32 139 if (ref $$hash_ref{$key} eq 'ARRAY') { }
139 0 elsif (not ref $$hash_ref{$key}) { }
4540 41 130 if ($ref and exists $data_ref{"$ref"}) { }
4542 0 41 if $$this{'debug'} >= 2
4548 0 130 if $$this{'debug'} >= 2
4554 171 0 if $ref
4556 0 171 if $$this{'debug'} >= 2
4559 22 278 unless $val
4561 0 278 if $$this{'debug'} >= 2
4563 35 243 if (index($val, '$') >= 0)
4565 0 35 if $$this{'debug'} >= 2
4574 0 63 if $$this{'debug'}
4576 0 63 if $$this{'debug'}
4581 0 45 if $$this{'debug'}
4584 0 45 unless exists $$hash_ref{$key}
4587 17 28 if ${$$_state_href{$key};} eq 'expanded'
4590 7 21 if (ref $$hash_ref{$key} eq 'ARRAY') { }
21 0 elsif (not ref $$hash_ref{$key}) { }
4605 0 28 if $$this{'debug'}
4612 0 97 if $$this{'debug'}
4635 0 68 if $$this{'debug'}
4638 16 52 if ($escaped) { }
4642 0 16 if $$this{'debug'}
4643 0 16 if $$this{'debug'}
4648 30 22 if (defined $$hash_ref{$var})
4650 0 30 if $$this{'debug'}
4651 10 20 if (${$$_state_href{$var};} eq 'to_expand')
4653 0 10 if $$this{'debug'}
4657 30 0 if (${$$_state_href{$var};} eq 'expanded')
4659 0 30 if $$this{'debug'}
4661 0 30 if ref $$hash_ref{$var} eq 'ARRAY'
4664 0 52 if $$this{'debug'}
4667 22 30 unless ($replace)
4672 22 24 if (defined $$href{$var})
4675 0 22 if ref $$href{$var} eq 'ARRAY'
4676 0 22 if $$this{'debug'}
4681 0 52 if $$this{'debug'}
4683 0 52 unless ($replace)
4686 0 0 if $$this{'debug'}
4687 0 0 if $$this{'debug'}
4691 0 68 if $$this{'debug'}
4696 0 28 if $$this{'debug'} >= 2
4701 0 28 if $$this{'debug'} >= 2
4803 0 0 if (-f $file)
4805 0 0 if (open my $fh, "<$file")
4811 0 0 if ($line =~ /^\s*package\s+$module\s*;/)
4813 0 0 if ($file_ref)
4824 0 0 if $found
4845 0 0 if ($module eq 'App::Framework::Lite') { }
0 0 elsif ($embed_libs) { }
4852 0 0 if ($module =~ /^App::Framework::Lite/) { }
4860 0 0 if ($file =~ /$regexp/)
4887 0 0 if $$this{'debug'}
4890 0 0 unless open my $in_fh, "<$src"
4891 0 0 unless open my $out_fh, ">$dest"
4900 0 0 if $$this{'debug'}
4902 0 0 if ($line =~ /^__DATA__/) { }
4940 0 0 unless ($perl_line)
4943 0 0 if ($line =~ /^#!/)
4950 0 0 if ($line =~ /^\s*use\s+(\S+)(.*);/)
4953 0 0 if ($module eq 'strict')
4961 0 0 if ($this->_module_to_embed($module, $file, $embed_libs))
4965 0 0 if $$this{'debug'}
4974 0 0 unless ($handled_libs{$mod})
4981 0 0 if $$this{'debug'}
4989 0 0 if $$this{'debug'}
5027 0 0 if $$this{'debug'}
5034 0 0 unless open my $in_fh, "<$src"
5049 0 0 unless $compress
5055 0 0 if $$this{'debug'}
5056 0 0 if $$this{'debug'}
5058 0 0 if $complete
5060 0 0 if ($line =~ /\@NO\-EMBED (\w+)/)
5062 0 0 if ($1 eq 'BEGIN') { }
5072 0 0 if $no_embed
5076 0 0 if ($line =~ /^=(\w+)/)
5078 0 0 if ($1 eq 'cut') { }
5092 0 0 unless ($pod)
5094 0 0 if ($line =~ /^\s*use\s+(\S+)(.*);/)
5100 0 0 if $$this{'debug'}
5103 0 0 if ($this->_module_to_embed($module, $file, $embed_libs))
5105 0 0 if $$this{'debug'}
5115 0 0 if ($asis) { }
5118 0 0 if ($line =~ /^$asis/)
5123 0 0 if $$this{'debug'}
5129 0 0 if $pod and $$this{'debug'}
5130 0 0 if $pod
5135 0 0 if not $line and $$this{'debug'}
5136 0 0 unless $line
5138 0 0 if $line =~ /^#/ and $$this{'debug'}
5139 0 0 if $line =~ /^#/
5142 0 0 if ($line =~ /<<['"]*(\w+)['"]*/)
5149 0 0 unless ($pod)
5152 0 0 if ($line =~ /^\s*BEGIN/)
5155 0 0 if $$this{'debug'}
5157 0 0 if ($begin)
5162 0 0 if $$this{'debug'}
5163 0 0 if ($line =~ /{/)
5167 0 0 if $$this{'debug'}
5169 0 0 if ($varsdef)
5171 0 0 if $$this{'debug'}
5176 0 0 if $$this{'debug'}
5181 0 0 if ($line =~ /^__END__|^1;/)
5183 0 0 if $$this{'debug'}
5186 0 0 if ($varsdef)
5188 0 0 if $$this{'debug'}
5200 0 0 if ($line =~ /^\s*sub/)
5208 0 0 if ($line =~ /#/)
5214 0 0 if ($varinit)
5216 0 0 if $$this{'debug'}
5221 0 0 if ($line and not $line =~ /^package/ and not $line =~ /^#/ and not $pod and not $use)
5228 0 0 if $comment or $asis
5230 0 0 if $$this{'debug'}
5243 0 0 if ($current_len + $line_len >= $MAX_LINE_LEN)
5250 0 0 if $$this{'debug'}
5254 0 0 if ($asis or $comment) { }
5267 0 0 if $$this{'debug'}
5287 0 0 if (exists $$libs_href{$module}) { }
5316 0 21 if (_load_module('Debug::DumpObj')) { }
5324 21 0 if (_load_module('Data::Dumper')) { }
5347 21 21 if (eval "require $mod") { }
5380 192 18 unless $$this{$field_name}
5400 21 0 unless $$this{$field_name}
5431 52 161 if (exists $stash{$external_name})
5437 21 31 if ($type eq 'SCALAR')
5439 16 5 if (defined $alias)
5444 0 52 if ($type eq 'ARRAY')
5447 0 0 if (@alias)
5452 0 52 if ($type eq 'HASH') { }
31 21 elsif ($type eq 'CODE') { }
5454 0 0 if (%alias)
5461 31 0 if (defined &alias)
5491 29 35 if $sub
5512 0 4062 if ($$obj{'debug'} >= $min_debug)
5547 21 24 if (ref $this)
5562 48 42 unless exists $inc{$path}
5564 0 90 unless exists $inc{$path}
5632 0 0 if (exists $lookup{$data_ref})