Branch Coverage

blib/lib/MIME/Parser/Filer.pm
Criterion Covered Total %
branch 47 68 69.1


line true false branch
262 0 76 if not defined $dir or $dir eq ''
263 0 76 if $dir eq '/'
281 130 0 if @_ > 1
288 0 296 if ('MIME::Tools'->debugging)
289 0 0 if ($self->{'MPF_Results'})
300 10 0 if ($self->{'MPF_Results'})
363 0 79 if not defined $name or $name eq ''
364 10 69 if $name =~ /(^\s)|(\s+\Z)/
365 4 65 if $name =~ /^\.+\Z/
366 13 52 if $name =~ /[^-A-Z0-9_+=.,\@\#\$\% ]/i
368 0 52 if $self->{'MPF_MaxName'} and length $name > $self->{'MPF_MaxName'}
406 3 10 if ($last and not $self->evil_filename($last))
412 5 5 $last =~ /^(.*)\.([^\.]+)\Z/ ? :
420 6 4 unless $ext =~ /^\w+$/
421 10 0 $ext ? :
422 6 4 unless ($self->evil_filename($trunc))
429 4 0 unless ($self->evil_filename($trunc))
473 6 90 $i ? :
476 90 6 unless (-e $path)
477 5 85 if $i
501 0 37 if @_
546 0 53 $recommended && $recommended =~ /(\.\w+)\Z/ ? :
585 0 53 if @_ > 1
669 53 37 if (not defined $fname) { }
0 37 elsif ($self->ignore_filename) { }
5 32 elsif ($self->evil_filename($fname)) { }
681 5 0 if (defined $ex and not $self->evil_filename($ex)) { }
714 0 73 unless -e $path
716 0 73 if -e $path
745 25 153 if @_ == 1
747 54 99 if (ref $path) { }
895 0 3 defined $self->{'MPFU_DirName'} ? :
902 0 3 if $self->{'MPFU_Purge'}
903 0 3 unless -d $self->output_dir or mkdir $self->output_dir, 448