Branch Coverage

blib/lib/EMDIS/ECS/Message.pm
Criterion Covered Total %
branch 36 74 48.6


line true false branch
27 0 20 if (ref $arg1) { }
43 19 1 if ($raw_text =~ /(.*?\n)\n(.*)/s) { }
52 18 1 if ($this->{'headers'} =~ /^Subject:\s*(.+?)$/im) { }
59 0 18 if ($this->{'headers'} =~ /^x-emdis-message-type:\s*(\S+)\s*$/imo)
65 0 18 if (ecs_is_configured()) { }
72 9 9 if ($this->{'subject'} =~ m[$mail_mrk:(\S+?):(\d+)(:(\d+)/(\d+))?\s*$]i) { }
1 8 elsif ($this->{'subject'} =~ /$mail_mrk:(\S+?):(\d+):DOC\s*$/io) { }
3 5 elsif ($this->{'subject'} =~ /$mail_mrk:(\S+)\s*$/i) { }
79 2 7 defined $4 ? :
80 2 7 defined $5 ? :
81 1 8 if ($this->{'part_num'} > $this->{'num_parts'})
109 1 16 if ($this->{'headers'} =~ /^Content-type:\s*(.+?)\s*$/im)
114 15 2 if ($this->{'headers'} =~ /^From:\s*(.+?)\s*$/im)
119 15 2 if ($this->{'headers'} =~ /^To:\s*(.+?)\s*$/im)
124 1 16 if ($this->{'headers'} =~ /^Content-Transfer-Encoding\s*:\s*quoted-printable$/im)
253 1 0 if (ref $arg1) { }
264 0 1 unless open MSGFILE, ">$filename"
266 0 1 unless print MSGFILE $msg->full_msg
281 0 1 if (ref $arg1) { }
292 0 1 unless open MSGFILE, "< $filename"
294 0 1 unless $raw_text = join('', readline MSGFILE)
297 0 1 if $err
301 0 1 if (ref $arg1) { }
310 1 0 if ref $newmsg
323 0 0 if (ref $arg1) { }
335 0 0 unless ref $newmsg
336 0 0 unless $newmsg->is_ecs_message or $newmsg->is_document
341 0 0 unless ($was_locked)
342 0 0 unless $node_tbl->lock
347 0 0 unless ($was_locked)
350 0 0 unless ($node)
357 0 0 if (/PGP2/i)
362 0 0 /verify/i ? :
365 0 0 if (/OpenPGP/i)
370 0 0 /verify/i ? :
375 0 0 if ($err)
383 0 0 unless $fh->open("< $decr_filename")