line |
true |
false |
branch |
32
|
0 |
129 |
if ($options->{'output'}) { } |
|
129 |
0 |
elsif (not $options->{'in_place'}) { } |
33
|
0 |
0 |
if ($options->{'debug_mode'}) |
36
|
0 |
0 |
$options->{'append'} ? : |
39
|
0 |
0 |
unless open $global_output_fh, "${mode}:encoding($options->{'output_encoding'})", $options->{'output'} |
41
|
129 |
0 |
if $options->{'debug_mode'} |
51
|
0 |
127 |
if ($options->{'output'}) |
52
|
0 |
0 |
unless close $global_output_fh |
67
|
0 |
145 |
unless (defined $content) |
68
|
0 |
0 |
if ($@) |
77
|
1 |
144 |
if ($options->{'preserve_eol'}) { } |
83
|
10 |
135 |
if ((pos $content // 0) < length $content) |
85
|
10 |
0 |
if $options->{'debug_mode'} |
95
|
24 |
0 |
if $options->{'debug_mode'} |
96
|
0 |
24 |
unless open my $fh, "<:encoding($options->{'input_encoding'})", $path |
99
|
0 |
24 |
unless close $fh |
107
|
121 |
0 |
if $options->{'debug_mode'} |
118
|
121 |
24 |
if (ref $input) |
119
|
121 |
0 |
if ($input == \$stdin_marker) { } |
131
|
5 |
148 |
unless @$content |
134
|
142 |
6 |
if $options->{'fix_final_separator'} or not $missing_final_separator |
142
|
1 |
5 |
$append ? : |
143
|
6 |
0 |
if $options->{'debug_mode'} |
144
|
0 |
6 |
unless open my $out_fh, "${m}:encoding($options->{'output_encoding'})", $file_name |
147
|
0 |
6 |
unless close $out_fh |
153
|
0 |
141 |
if ($options->{'in_place'}) { } |
168
|
6 |
0 |
if $options->{'debug_mode'} |
169
|
0 |
6 |
if ($file_name eq '-') { } |
180
|
0 |
0 |
if ($input eq '-') { } |