Branch Coverage

blib/lib/MIME/Parser/Filer.pm
Criterion Covered Total %
branch 49 72 68.0


line true false branch
258 56 0 if ($$ =~ /^(\d+)$/)
274 0 78 if not defined $dir or $dir eq ""
275 0 78 if $dir eq "/"
293 143 0 if @_ > 1
300 0 296 if ("MIME::Tools"->debugging)
301 0 0 if ($self->{'MPF_Results'})
312 10 0 if ($self->{'MPF_Results'})
375 0 79 if not defined $name or $name eq ""
376 10 69 if $name =~ /(^\s)|(\s+\Z)/
377 4 65 if $name =~ /^\.+\Z/
378 13 52 if $name =~ /[^-A-Z0-9_+=.,\@\#\$\% ]/i
380 0 52 if $self->{'MPF_MaxName'} and length $name > $self->{'MPF_MaxName'}
418 3 10 if ($last and not $self->evil_filename($last))
424 5 5 $last =~ /^(.*)\.([^\.]+)\Z/ ? :
432 6 4 unless $ext =~ /^\w+$/
433 10 0 $ext ? :
434 6 4 unless ($self->evil_filename($trunc))
441 4 0 unless ($self->evil_filename($trunc))
485 6 90 $i ? :
488 90 6 unless (-e $path)
489 5 85 if $i
513 0 37 if @_
558 0 53 $recommended && $recommended =~ /(\.\w+)\Z/ ? :
597 0 53 if @_ > 1
681 53 37 if (not defined $fname) { }
0 37 elsif ($self->ignore_filename) { }
5 32 elsif ($self->evil_filename($fname)) { }
693 5 0 if (defined $ex and not $self->evil_filename($ex)) { }
706 32 0 if ($fname =~ /^(.*)$/)
732 0 73 unless -e $path
734 0 73 if -e $path
763 25 164 if @_ == 1
765 65 99 if (ref $path) { }
913 0 3 defined $self->{'MPFU_DirName'} ? :
921 0 3 if $self->{'MPFU_Purge'}
922 0 3 unless -d $self->output_dir or mkdir $self->output_dir, 448