Branch Coverage

blib/lib/Footprintless/Command.pm
Criterion Covered Total %
branch 94 114 82.4


line true false branch
28 21 14 if ref $commands[$#commands] eq 'Footprintless::Command::CommandOptions'
30 7 28 if ref $commands[$#commands] eq 'HASH'
32 21 14 if $command_options
61 9 5 if ref $_[0] eq 'Footprintless::Command::CommandOptions'
64 8 6 if ref $_[0] eq 'Footprintless::Command::CommandOptions'
68 5 9 unless $source_command_options
69 6 8 unless $destination_command_options
73 6 8 if ($cp_options{'file'}) { }
76 1 5 if ($cp_options{'compress'}) { }
89 3 5 if ($cp_options{'archive'} and $cp_options{'archive'} eq 'zip') { }
105 1 4 if ($cp_options{'status'})
106 1 0 $source_command_options ? :
123 2 3 if ($cp_options{'compress'})
128 5 0 $destination_command_options ? :
190 23 11 if ($entry =~ m[(?:/|\\)$]) { }
198 17 6 if (@dirs) { }
199 2 15 if (@files) { }
225 1 1 if (ref $args[$#args] eq 'HASH')
230 0 2 if $options->{'in_place'}
231 0 2 if (defined $options->{'temp_script_file'}) { }
233 0 0 if scalar @args
240 0 0 if defined $options->{'replace_map'}
245 1 1 if scalar @args
250 1 1 if defined $options->{'replace_map'}
252 0 2 if $options->{'files'}
261 49 246 if (defined $sudo_username)
262 5 44 $sudo_command ? :
47 2 $sudo_username ? :
277 9 1 if ($options{'follow'}) { }
1 0 elsif ($options{'lines'}) { }
293 4 1 if ref $lines[$#lines] eq 'Footprintless::Command::CommandOptions'
295 3 2 if ref $lines[$#lines] eq 'HASH'
298 3 2 if (defined $write_options and defined $write_options->{'mode'}) { }
1 1 elsif (defined $command_options) { }
299 3 0 if (defined $command_options) { }
0 0 elsif (defined $command_options) { }
316 2 3 defined $write_options && defined $write_options->{'line_separator'} ? :
327 121 90 if (ref $args[$#args] eq 'Footprintless::Command::CommandOptions')
341 289 1 if (defined $command)
342 78 211 if ($commands++ > 0)
344 0 78 if ($pretty)
357 7 204 if ($wrap_options->{'subshell'})
361 159 48 unless (defined $username or defined $hostname)
367 1 3 $ssh =~ /plink(?:\.exe)?$/ ? :
4 48 $username ? :
385 3 6 if (exists $instance->{'hostname'} and not exists $options{'hostname'})
388 0 9 if (exists $instance->{'ssh'} and not exists $options{'ssh'})
391 0 9 if (exists $instance->{'username'} and not exists $options{'username'})
394 0 9 if (exists $instance->{'sudo_command'} and not exists $options{'sudo_command'})
397 0 9 if (exists $instance->{'sudo_username'} and not exists $options{'sudo_username'})
400 0 9 if (exists $instance->{'pretty'} and not exists $options{'pretty'})
434 42 50 if defined $options{'hostname'}
435 38 54 if defined $options{'ssh'}
436 4 88 if defined $options{'username'}
437 4 88 if defined $options{'sudo_command'}
438 27 65 if defined $options{'sudo_username'}
439 0 92 if defined $options{'pretty'}