line |
true |
false |
branch |
29
|
0 |
4 |
unless $parser->getoptionsfromarray(\@argv, "version|v", sub {
printf "%s %s\n", "App::ChangeShebang", "App::ChangeShebang"->VERSION;
exit;
}
, "quiet|q", \$self->{'quiet'}, "force|f", \$self->{'force'}, "help|h", sub {
Pod::Usage::pod2usage(0);
}
) |
32
|
0 |
4 |
unless (@file) |
43
|
0 |
12 |
unless -f $file and not -l $file |
44
|
1 |
11 |
unless $self->is_perl_shebang($file) |
45
|
0 |
11 |
unless ($self->{'force'}) |
47
|
0 |
0 |
unless $anser =~ /^y(es)?$/iu |
50
|
0 |
11 |
unless $self->{'quiet'} |
56
|
0 |
12 |
unless open my $fh, "<:raw", $file |
57
|
0 |
12 |
unless read $fh, my $first, 100 |
58
|
11 |
1 |
$first =~ /^#!([^\n]*)perl/u ? : |
77
|
0 |
11 |
unless open my $fh, "<:raw", $file |
94
|
0 |
11 |
unless rename $tmp_name, $file |