| line |
true |
false |
branch |
|
34
|
1 |
19 |
if ($on) { } |
|
56
|
1 |
31 |
if ($DRY_RUN) |
|
58
|
1 |
0 |
if $DRY_RUN |
|
61
|
0 |
31 |
if ($CONFIRM) |
|
63
|
0 |
0 |
if ($answer =~ /^\s*y\s*$/) |
|
107
|
16 |
2 |
if (exists $tags{':all'}) |
|
113
|
0 |
641 |
unless exists $EXPORTABLE{$func} |
|
196
|
0 |
2 |
unless _confirm("cp $_[0] $_[1]") |
|
200
|
1 |
1 |
unless File::Copy::copy(@_) |
|
219
|
0 |
0 |
unless _confirm("mv $_[0] $_[1]") |
|
223
|
0 |
0 |
unless File::Copy::move(@_) |
|
246
|
0 |
1 |
unless _confirm("Downloading $url => ", basename($url)) |
|
257
|
1 |
0 |
if ($rc != HTTP::Status::RC_OK()) |
|
291
|
0 |
3 |
unless @_ == 1 and defined $_[0] |
|
294
|
0 |
3 |
unless _confirm("untar $_[0]") |
|
304
|
1 |
2 |
if ($nice and $topdir eq $namedir) { } |
|
|
0 |
2 |
elsif ($nice) { } |
|
311
|
0 |
0 |
unless rename $topdir, $namedir |
|
314
|
0 |
2 |
unless defined $topdir |
|
323
|
0 |
3 |
unless (@extracted) |
|
347
|
0 |
0 |
unless defined $tar_file and defined $dir |
|
350
|
0 |
0 |
unless _confirm("Untarring $tar_file in $dir") |
|
352
|
0 |
0 |
unless -d $dir |
|
361
|
0 |
0 |
unless $arch->extract |
|
408
|
0 |
0 |
if (@_ < 3 or ref $options ne 'ARRAY') |
|
419
|
0 |
0 |
if $count eq $default |
|
426
|
0 |
0 |
unless defined $input and length $input |
|
428
|
0 |
0 |
if not $input =~ /^\d+$/ or $input == 0 or $input > scalar @$options |
|
452
|
0 |
0 |
unless defined $opts |
|
457
|
0 |
0 |
if (@_ < 2) |
|
462
|
0 |
0 |
if $value eq '' |
|
472
|
0 |
0 |
unless defined $opts |
|
476
|
0 |
0 |
if ($opts->{'tty'}) |
|
477
|
0 |
0 |
unless open $old_stderr, '>&', \*STDERR |
|
479
|
0 |
0 |
unless open $fh, '>>', '/dev/tty' |
|
483
|
0 |
0 |
unless print $fh $prompt |
|
486
|
0 |
0 |
if ($opts->{'tty'}) |
|
488
|
0 |
0 |
unless open STDERR, '>&', $old_stderr |
|
500
|
0 |
0 |
unless defined $opts |
|
506
|
0 |
0 |
if ($opts->{'tty'}) |
|
507
|
0 |
0 |
unless open $fh, '<', '/dev/tty' |
|
512
|
0 |
0 |
if defined $input |
|
532
|
0 |
5 |
unless _confirm("mkd @_") |
|
536
|
1 |
4 |
unless mkpath(@_) |
|
556
|
0 |
4 |
unless _confirm("rmf $_[0]") |
|
558
|
2 |
2 |
unless (-e $_[0]) |
|
565
|
0 |
2 |
unless rmtree($_[0]) |
|
591
|
7 |
12 |
if ref $_[1] eq 'HASH' |
|
593
|
12 |
7 |
if ($opts->{'stack_update'}) |
|
595
|
0 |
12 |
unless (defined $cwd) |
|
601
|
1 |
18 |
unless chdir $_[0] |
|
624
|
6 |
1 |
unless defined $opts |
|
629
|
0 |
7 |
unless @DIR_STACK |
|
631
|
1 |
6 |
if ($opts->{'reset'}) |
|
637
|
0 |
7 |
unless defined $old_dir |
|
659
|
0 |
0 |
unless _confirm("make @_") |
|
663
|
0 |
0 |
if system "make @_" |
|
676
|
0 |
6 |
if ($tar_file =~ /\.tar\.gz\b|\.tgz\b/ and not Log::Log4perl::Util::module_available('IO::Zlib')) |
|
696
|
0 |
3 |
unless defined $dir |
|
710
|
0 |
3 |
unless @names |
|
717
|
0 |
7 |
if $name eq './' |
|
720
|
2 |
5 |
if ($topdir ne $archdir) |
|
761
|
0 |
1 |
if (defined $files[-1] and ref $files[-1] eq 'HASH') |
|
771
|
0 |
1 |
unless _confirm("editing $file in-place") |
|
775
|
0 |
1 |
unless open FILE, "<$file" |
|
778
|
0 |
1 |
if ($options->{'utf8'}) |
|
819
|
0 |
1 |
if (defined $files[-1] and ref $files[-1] eq 'HASH') |
|
829
|
0 |
1 |
unless _confirm("Ploughing through $file") |
|
833
|
0 |
1 |
unless open FILE, "<$file" |
|
836
|
0 |
1 |
if ($options->{'utf8'}) |
|
867
|
3 |
6 |
unless defined $options |
|
878
|
8 |
1 |
if ($from_file) { } |
|
880
|
0 |
8 |
unless open FILE, "<$file" |
|
883
|
1 |
7 |
if (exists $options->{'utf8'}) |
|
918
|
0 |
7 |
if (defined $options and ref $options eq '') |
|
922
|
5 |
2 |
unless defined $options |
|
927
|
7 |
0 |
unless defined $options->{'append'} |
|
929
|
0 |
7 |
$options->{'append'} ? : |
|
|
1 |
6 |
unless _confirm(($options->{'append'} ? 'Appending' : 'Writing') . ' ' . length($data) . " bytes to $file") |
|
932
|
0 |
6 |
$options->{'append'} ? : |
|
|
0 |
6 |
unless open FILE, '>' . ($options->{'append'} ? '>' : '') . $file |
|
938
|
0 |
6 |
if ($options->{'utf8'}) |
|
942
|
0 |
6 |
unless print FILE $data |
|
945
|
0 |
6 |
unless close FILE |
|
973
|
0 |
1 |
unless _confirm('Writing atomically ' . length($data) . " bytes to $file") |
|
976
|
1 |
0 |
unless defined $options |
|
984
|
0 |
1 |
unless rename $tmpname, $file |
|
1056
|
0 |
5 |
if (defined $args[-1] and ref $args[-1] eq 'HASH') |
|
1064
|
0 |
5 |
unless _confirm("tapping @args") |
|
1068
|
3 |
2 |
if ref $args[0] eq 'HASH' |
|
1077
|
0 |
5 |
if ($opts->{'no_quotes'}) { } |
|
|
0 |
5 |
elsif ($opts->{'double_quotes'}) { } |
|
1089
|
0 |
5 |
unless open PIPE, $cmd |
|
1092
|
0 |
5 |
if ($options->{'utf8'}) |
|
1103
|
0 |
5 |
if ($opts->{'stderr_limit'}) |
|
1107
|
1 |
0 |
if ($exit_code != 0 and $opts->{'raise_error'}) |
|
1111
|
1 |
3 |
if ($opts->{'stdout_limit'}) |
|
1205
|
3 |
0 |
if (defined $metas) |
|
1206
|
1 |
2 |
if $metas eq ':shell' |
|
1257
|
10 |
1 |
if (defined $metas and $metas eq ':shell') { } |
|
1264
|
0 |
11 |
if (defined $metas and $metas ne ':shell') |
|
1290
|
0 |
1 |
unless _confirm("perm_cp @_") |
|
1292
|
0 |
1 |
if @_ < 2 |
|
1324
|
0 |
0 |
unless _confirm("owner_cp @_") |
|
1326
|
0 |
0 |
if @_ < 2 |
|
1330
|
0 |
0 |
unless (defined $uid and defined $gid) |
|
1335
|
0 |
0 |
unless (chown $uid, $gid, @dst) |
|
1361
|
0 |
1 |
unless my(@stats) = (stat $filename)[2, 4, 5] |
|
1388
|
0 |
1 |
unless _confirm("perm_set $filename (@$perms)") |
|
1390
|
0 |
1 |
unless chown $perms->[1], $perms->[2], $filename |
|
1393
|
0 |
1 |
unless chmod $perms->[0] & 4095, $filename |
|
1416
|
0 |
0 |
unless _confirm("sysrun: @cmds") |
|
1418
|
0 |
0 |
if @_ < 1 |
|
1420
|
0 |
0 |
if system @cmds |
|
1443
|
0 |
0 |
unless _confirm("Hammer: @cmds") |
|
1492
|
0 |
0 |
unless _confirm('sudo_me') |
|
1494
|
0 |
0 |
unless $argv |
|
1498
|
0 |
0 |
if ($> != 0) |
|
1501
|
0 |
0 |
unless $sudo |
|
1502
|
0 |
0 |
unless exec $sudo, $0, @$argv |
|
1544
|
1 |
0 |
unless defined $options |
|
1550
|
0 |
1 |
unless defined $find |
|
1553
|
0 |
1 |
unless defined $cpio |
|
1560
|
0 |
1 |
unless open my $in, "$cmd |" |
|
1563
|
0 |
1 |
if $options->{'utf8'} |
|
1588
|
1 |
0 |
unless defined $options |
|
1594
|
0 |
1 |
unless defined $cpio |
|
1596
|
1 |
0 |
unless -d $dir |
|
1603
|
0 |
1 |
unless open my $out, "| $cmd" |
|
1606
|
0 |
1 |
if $options->{'utf8'} |
|
1637
|
0 |
0 |
unless (defined syswrite($out, $buf)) |
|
1641
|
0 |
0 |
unless (defined $ret) |
|
1675
|
20 |
4 |
if (length $data <= $maxlen) |
|
1679
|
2 |
2 |
if $maxlen < 12 |
|
1766
|
0 |
0 |
unless defined $time |
|
1813
|
1 |
2 |
if (not defined $_[0]) |
|
1832
|
0 |
0 |
unless (utf8_available()) |
|
1852
|
0 |
0 |
if ($@) |