Branch Coverage

blib/lib/Matts/Message/Parser.pm
Criterion Covered Total %
branch 0 278 0.0


line true false branch
19 0 0 unless $ENV{'DEBUG'}
24 0 0 if ($] > 5.007) { }
128 0 0 if (ref $_[0] and UNIVERSAL::isa($_[0], 'IO::Handle')) { }
133 0 0 if (defined *{$_[0];})
137 0 0 if defined $ioref
142 0 0 unless (defined $ioref)
162 0 0 if ($header =~ /^from\s+([^:].*)$/)
176 0 0 if ($last =~ /^\s+\S/)
183 0 0 if ($value =~ /[\x80-\xff]/) { }
195 0 0 if $last =~ /^$/m
198 0 0 if ($opts{'header_only'})
199 0 0 if ($msg->binary_headers)
226 0 0 unless $msg->binary_headers
234 0 0 if ($enc ne 'null')
243 0 0 unless ($binenc)
246 0 0 if ($ct and $ct =~ /charset="?([^\";]+)"?;?/i)
260 0 0 unless ($msg->header('message-id'))
264 0 0 unless ($msg->header('subject'))
279 0 0 if ($type =~ m[^text/html]i) { }
0 0 elsif ($type =~ /^text/i) { }
0 0 elsif ($type =~ /ms-tnef/i) { }
0 0 elsif ($type =~ m[^multipart/alternative]i) { }
0 0 elsif ($type =~ m[^multipart/]i) { }
293 0 0 if ($@)
310 0 0 unless ($msg->body)
333 0 0 if $line =~ /^\-\-\Q$boundary\E$/
348 0 0 if (/^\-\-\Q$boundary\E/ or eof $body)
354 0 0 if ($part_msg->header('content-type') =~ /^text/i) { }
361 0 0 if $line =~ /^\-\-\Q$boundary\E\-\-$/
368 0 0 if ($in_body) { }
374 0 0 if (/^\S/) { }
0 0 elsif (/^$/) { }
375 0 0 if ($header)
382 0 0 if ($header)
409 0 0 if $line =~ /^\-\-\Q$boundary\E$/
424 0 0 if (/^\-\-\Q$boundary\E/ or eof $body)
431 0 0 if $line =~ /^\-\-\Q$boundary\E\-\-$/
438 0 0 if ($in_body) { }
444 0 0 if (/^\S/) { }
0 0 elsif (/^$/) { }
445 0 0 if ($header)
452 0 0 if ($header)
487 0 0 unless my $tnef = 'Matts::Message::TNEF'->read($main, {'output_dir', $dir})
491 0 0 if (my $data = $body_part->data)
523 0 0 $cte eq 'Q' ? :
0 0 $cte eq 'B' ? :
535 0 0 unless $header
536 0 0 unless $header =~ /=\?/ or $header =~ /[\x80-\xff]/
573 0 0 if (lc $msg->header('content-transfer-encoding') eq 'quoted-printable') { }
0 0 elsif (lc $msg->header('content-transfer-encoding') eq 'base64') { }
578 0 0 if /[\x80-\xff]/
588 0 0 if /[<\.,]/
590 0 0 if ($not_really_base64) { }
592 0 0 if /[\x80-\xff]/
596 0 0 if (my $len = length($_) % 4)
601 0 0 if /[\x80-\xff]/
612 0 0 if $buf =~ /[\x80-\xff]/
621 0 0 unless ($filename)
628 0 0 if ($type =~ /html/i)
630 0 0 if (/]*charset="?([\w-]*)[^>]*>/i)
640 0 0 if ($binenc) { }
0 0 elsif ($type and $type =~ /^text\b/i) { }
649 0 0 if ($type =~ s/charset="?([^\";]+)"?;?//i)
656 0 0 if ($hibit)
661 0 0 if ($converter)
710 0 0 if $loaded
714 0 0 unless $enc =~ /^cp(\d+)$/
717 0 0 if $@
721 0 0 if $@
736 0 0 if $enc =~ /ascii/i
742 0 0 unless ($@)
744 0 0 if ($$self{'from'} ne $enc)
747 0 0 wantarray ? :
751 0 0 wantarray ? :
928 0 0 if ($$parms{'debug'})
946 0 0 defined $bytes ? :
952 0 0 unless @_ == 2 or @_ == 3
961 0 0 if defined $parms
969 0 0 unless $num_bytes == 4
970 0 0 if $debug
971 0 0 unless $data eq $Matts::Message::TNEF::TNEF_SIGNATURE
976 0 0 unless $num_bytes == 2
977 0 0 if $debug
981 0 0 unless $num_bytes == 1
987 0 0 if $debug
988 0 0 unless $is_msg or $is_att
999 0 0 $is_msg ? :
1001 0 0 if $debug
1003 0 0 unless $num_bytes == 4
1007 0 0 if $debug
1009 0 0 unless $Matts::Message::TNEF::att_name{$att_id}
1011 0 0 if ($att_id eq $Matts::Message::TNEF::att{'TnefVersion'}) { }
0 0 elsif ($att_id eq $Matts::Message::TNEF::att{'MessageClass'}) { }
0 0 elsif ($att_id eq $Matts::Message::TNEF::att{'AttachRenddata'}) { }
1012 0 0 if $is_att
1016 0 0 if $is_att
1020 0 0 if $is_msg
1025 0 0 if $is_att and not @atts and $att_name ne 'AttachRenddata'
1031 0 0 if $debug
1034 0 0 unless $num_bytes == 4
1036 0 0 if $debug
1038 0 0 if $debug
1043 0 0 unless $data = _build_data($fd, $length, \$calc_chksum, $parms)
1045 0 0 if $debug
1049 0 0 unless $num_bytes == 2
1051 0 0 if ($debug)
1055 0 0 unless $calc_chksum eq $file_chksum or $ignore_checksum
1062 0 0 unless defined $num_bytes
1063 0 0 if $num_bytes < 1
1064 0 0 if $debug
1066 0 0 if $is_msg and $is_att
1069 0 0 if $is_msg or $is_att
1073 0 0 if $debug
1082 0 0 if ($length < $$parms{'debug_max_display'}) { }
1084 0 0 if ($att_id eq $Matts::Message::TNEF::att{'TnefVersion'}) { }
0 0 elsif (substr($att_id, 2) eq $Matts::Message::TNEF::atp{'Date'} and $length == 14) { }
0 0 elsif ($att_id eq $Matts::Message::TNEF::att{'AttachRenddata'} and $length == 14) { }
1109 0 0 unless my $io = $data->open('r')
1113 0 0 unless close $io
1132 0 0 if $length < $bufsiz
1138 0 0 unless $num_bytes == $bufsiz
1144 0 0 if $length < $bufsiz
1156 0 0 if exists $Matts::Message::TNEF::att{$_}
1160 0 0 if exists $Matts::Message::TNEF::att{$_}
1172 0 0 if wantarray
1199 0 0 if $name
1209 0 0 unless $data
1211 0 0 unless $pos >= 0
1214 0 0 if $longname
1221 0 0 if @_
1222 0 0 if @_
1229 0 0 if @_
1264 0 0 if @_ > 1
1275 0 0 if @_
1303 0 0 if ($mode eq 'w') { }
0 0 elsif ($mode eq 'r') { }
1312 0 0 if $self->binmode
1318 0 0 if (defined $self->path)
1319 0 0 unless unlink $self->path