Branch Coverage

blib/lib/FTN/Message/serialno/File.pm
Criterion Covered Total %
branch 29 52 55.7


line true false branch
74 0 3 unless $param{'directory'} and -d $param{'directory'}
93 2 1 exists $param{'file_extension'} ? :
112 3 0 if (defined $extension and length $extension)
115 3 0 if (substr($pattern, -1) eq '$') { }
127 0 3 unless $t =~ /$$self{'filename_pattern'}/
135 12 24 (shift()) =~ /$$self{'filename_pattern'}/ ? :
140 0 3 $param{'decode_filename'} && ref $param{'decode_filename'} eq 'CODE' ? :
147 0 3 $param{'encode_filename'} && ref $param{'encode_filename'} eq 'CODE' ? :
149 0 3 unless $$self{'decode_filename'}($$self{'encode_filename'}(1)) == 1
162 0 3 $param{'max_tries'} && $param{'max_tries'} =~ /^(\d+)$/ ? :
203 1 2 if ($param{'very_first_init'})
204 1 0 if (ref $param{'very_first_init'} eq 'CODE') { }
0 0 elsif ($param{'very_first_init'} eq 'CURRENT_UNIXTIME_MINUS_3_YEARS') { }
0 0 elsif ($param{'very_first_init'} eq 'CURRENT_UNIXTIME') { }
214 2 1 unless $$self{'very_first_init'}
231 0 3 if ref(my $class = shift())
256 0 12 unless ref(my $self = shift())
262 0 12 unless opendir my $dh, $$self{'directory'}
272 9 24 if (@t)
276 9 0 if -f $full_name
288 9 3 if (@found_file) { }
290 0 9 if @found_file > 1
298 9 0 if (rename $found_file[0][0], $new_file) { }
301 0 0 if $try++ < $$self{'max_tries'}
307 0 3 unless open my $fh, '>', $fn
321 0 21 unless ref(my $self = shift())