line |
true |
false |
branch |
100
|
1 |
1 |
if (scalar(@_) % 2) { } |
101
|
1 |
0 |
if scalar @_ == 1 |
105
|
0 |
0 |
if ($key eq 'log_file') { } |
|
0 |
0 |
elsif ($key eq 'max_size' and $val =~ /^\d+$/) { } |
|
0 |
0 |
elsif ($key eq 'wait_attempts' and $val =~ /^\d+$/) { } |
|
0 |
0 |
elsif ($key eq 'wait_interval' and $val =~ /^\d+$/) { } |
|
0 |
0 |
elsif ($key eq 'pid' and $val =~ /^(?:0|1)$/) { } |
|
0 |
0 |
elsif ($key eq 'mode' and $val =~ /^\d{4}$/) { } |
120
|
1 |
1 |
unless defined $$self{'log_file'} |
121
|
0 |
1 |
if (not sysopen(LOG, $$self{'log_file'}, 65, $$self{'mode'})) { } |
124
|
0 |
1 |
unless close LOG |
139
|
0 |
0 |
if (@_) |
142
|
0 |
0 |
if (not sysopen(LOG, $$self{'log_file'}, 65, $$self{'mode'})) { } |
145
|
0 |
0 |
unless close LOG |
160
|
1 |
0 |
if (@_) |
163
|
0 |
1 |
if defined $$self{'max_size'} and not $$self{'max_size'} =~ /^\d+$/ |
176
|
0 |
0 |
if (@_) |
179
|
0 |
0 |
if defined $$self{'wait_attempts'} and not $$self{'wait_attempts'} =~ /^\d+$/ |
192
|
0 |
0 |
if (@_) |
195
|
0 |
0 |
if defined $$self{'wait_interval'} and not $$self{'wait_interval'} =~ /^\d+$/ |
209
|
0 |
0 |
if (@_) |
212
|
0 |
0 |
if defined $$self{'mode'} and not $$self{'mode'} =~ /^\d{4}$/ |
226
|
1 |
0 |
if (@_) |
228
|
1 |
0 |
if $pset =~ /^(?:0|1)$/ |
244
|
1 |
1 |
unless $$self{'pid'} |
245
|
2 |
0 |
if (@_) |
264
|
0 |
2 |
unless defined $$self{'log_file'} |
267
|
0 |
2 |
unless sysopen LOG, $$self{'log_file'}, 1090, $$self{'mode'} |
278
|
0 |
2 |
if $track_waits == $$self{'wait_attempts'} |
281
|
2 |
0 |
if defined $$self{'max_size'} and $$self{'max_size'} =~ /^\d+$/ and $$self{'max_size'} > 0 |
283
|
0 |
2 |
unless flock LOG, 8 |
285
|
0 |
2 |
unless close LOG |
301
|
1 |
2 |
unless $$self{'roll_allowed'} |
303
|
0 |
2 |
unless seek LOG, 0, 0 |
305
|
0 |
2 |
unless defined $$self{'log_file'} |
306
|
1 |
1 |
if scalar @loglines < $$self{'max_size'} |
309
|
0 |
1 |
unless truncate LOG, 0 |
311
|
0 |
1 |
unless seek LOG, 0, 0 |