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'}/ ? :
138 0 3 $param{'decode_filename'} && ref $param{'decode_filename'} eq 'CODE' ? :
145 0 3 $param{'encode_filename'} && ref $param{'encode_filename'} eq 'CODE' ? :
147 0 3 unless $$self{'decode_filename'}($$self{'encode_filename'}(1)) == 1
160 0 3 $param{'max_tries'} && $param{'max_tries'} =~ /^(\d+)$/ ? :
201 1 2 if ($param{'very_first_init'})
202 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') { }
212 2 1 unless $$self{'very_first_init'}
229 0 3 if ref(my $class = shift())
254 0 12 unless ref(my $self = shift())
260 0 12 unless opendir my $dh, $$self{'directory'}
269 9 24 if (defined $t)
272 9 0 if -f $full_name
284 9 3 if (@found_file) { }
286 0 9 if @found_file > 1
294 9 0 if (rename $found_file[0][0], $new_file) { }
297 0 0 if $try++ < $$self{'max_tries'}
303 0 3 unless open my $fh, '>', $fn
317 0 21 unless ref(my $self = shift())