Branch Coverage

lib/Rex/Commands/Pkg.pm
Criterion Covered Total %
branch 0 110 0.0


line true false branch
88 0 0 if (exists $option{'package'} and ref $option{'package'} eq "ARRAY")
94 0 0 if (exists $option{'package'})
100 0 0 ref $package eq 'ARRAY' ? :
104 0 0 ref $res_name eq 'ARRAY' ? :
112 0 0 if ($option{'ensure'} eq 'latest') { }
0 0 elsif ($option{'ensure'} =~ /^(present|installed)$/u) { }
0 0 elsif ($option{'ensure'} eq 'absent') { }
0 0 elsif ($option{'ensure'} =~ /^\d/u) { }
134 0 0 if (exists $option{'on_change'} and ref $option{'on_change'} eq "CODE" and scalar @modifications > 0)
145 0 0 if (my($change) = grep({$candidate eq $_->{'name'};} @modifications))
151 0 0 if ($change->{'action'} eq 'updated') { }
0 0 elsif ($change->{'action'} eq 'installed') { }
0 0 elsif ($change->{'action'} eq 'removed') { }
167 0 0 ref $res_name eq 'ARRAY' ? :
273 0 0 unless (@_)
281 0 0 if (@new_args)
285 0 0 unless (eval { do { my(@new_args) = Rex::Hook::run_hook("install", "before", @_); if (@new_args) { @_ = @new_args; } ; 1 } })
295 0 0 if ($type eq 'file') { }
0 0 elsif ($type eq 'package') { }
297 0 0 if (ref $_[0] eq 'HASH') { }
311 0 0 $option->{'on_change'} ? :
317 0 0 if ($source =~ /\.tpl$/u) { }
324 0 0 unless $vars
328 0 0 if ($need_md5)
337 0 0 if ($need_md5)
348 0 0 if ($option->{'force'}) { }
361 0 0 if ($local_md5 eq $old_md5) { }
374 0 0 if (exists $option->{'owner'})
378 0 0 if (exists $option->{'group'})
382 0 0 if (exists $option->{'mode'})
386 0 0 if ($need_md5)
387 0 0 unless ($old_md5 and $new_md5 and $old_md5 eq $new_md5)
404 0 0 if (ref $_[0] eq 'HASH') { }
0 0 elsif ($_[0]) { }
415 0 0 unless (ref $package)
422 0 0 if (@{$package;} == 1) { }
424 0 0 unless ($pkg->is_installed($pkg_to_install, $option))
445 0 0 unless ($pkg->is_installed($pkg_to_install, $option))
450 0 0 if (@pkgCandidates)
457 0 0 if ("Rex::Config"->get_do_reporting)
466 0 0 if ("Rex::Config"->get_do_reporting)
483 0 0 if ($type eq 'package') { }
488 0 0 unless (ref $package)
518 0 0 if ($type eq 'package') { }
521 0 0 unless (ref $package eq "ARRAY")
526 0 0 if ($pkg->is_installed($_pkg)) { }
602 0 0 if $@
609 0 0 if (scalar @modifications > 0)
612 0 0 if (exists $option{'on_change'} and ref $option{'on_change'} eq "CODE")
748 0 0 if (ref $__data[0]) { }
749 0 0 if (not exists $__data[0]{get_operating_system()}) { }
750 0 0 if (exists $__data[0]{'default'}) { }
771 0 0 if ($action eq 'add') { }
0 0 elsif ($action eq 'remove' or $action eq 'delete') { }
778 0 0 if (exists $data{'after'})