Branch Coverage

blib/lib/XAO/DO/Web/Mailer.pm
Criterion Covered Total %
branch 71 112 63.3


line true false branch
122 3 10 if (my $override_to = $config->{'override_to'})
125 0 3 if (my $override_except = $config->{'override_except'}) { }
126 0 0 unless ref $override_except eq "ARRAY"
132 0 0 if (grep {index(lc $email, $_) >= 0;} @$override_except) { }
140 0 0 %override ? :
148 3 0 if $to
149 1 2 if $cc
150 1 2 if $bcc
158 3 10 if (not $from) { }
160 0 3 if ref $from
164 0 0 if ref $config->{'from'} and $config->{'from'}{$from}
166 0 13 unless $from
168 0 13 if (my $override_from = $config->{'override_from'})
169 0 0 if ($override_from ne $from)
179 0 13 if ($from =~ /^\s*.*\s+<(.*\@.*)>\s*$/) { }
0 13 elsif ($from =~ /^\s*(.*\@.*)\s+\(.*\)\s*$/) { }
191 1 12 if (my $subject_prefix = $config->{'subject_prefix'})
192 0 1 $subject_prefix =~ /\s$/ ? :
195 0 13 if (my $subject_suffix = $config->{'subject_suffix'})
196 0 0 $subject_suffix =~ /\s$/ ? :
207 3 10 if (&Encode::is_utf8($subject))
235 9 4 if ($args->{'text.path'} or $args->{'path'} or $args->{'text.template'} or $args->{'template'})
245 8 5 if ($args->{'html.path'} or $args->{'html.template'})
252 0 13 unless defined $text or defined $html
259 82 9 unless $k =~ /^attachment\.(\w+)\.type$/
268 9 0 if ($$args{'attachment.' . $id . '.template'} or $$args{'attachment.' . $id . '.path'}) { }
0 0 elsif ($$args{'attachment.' . $id . '.file'}) { }
271 77 35 unless $kk =~ /^attachment\.$id\.(.*)$/
276 9 0 if ($$args{'attachment.' . $id . '.unparsed'}) { }
277 7 2 if (defined $$args{'attachment.' . $id . '.template'}) { }
2 0 elsif (defined $$args{'attachment.' . $id . '.path'}) { }
291 0 0 if ($$args{"attachment." . $id . ".pass"})
302 1 8 if utf8::is_utf8($content)
327 3 10 $charset && utf8::is_utf8($subject) ? :
340 3 10 if (defined $html and not defined $text and not @attachments) { }
4 6 elsif (defined $text and not defined $html and not @attachments) { }
341 0 3 $charset && utf8::is_utf8($html) ? :
348 3 0 if $charset
354 0 4 $charset && utf8::is_utf8($text) ? :
361 3 1 if $charset
368 5 1 if (defined $text)
369 0 5 $charset && utf8::is_utf8($text) ? :
378 5 0 if $charset
382 5 1 if (defined $html)
383 0 5 $charset && utf8::is_utf8($html) ? :
392 5 0 if $charset
395 5 1 @attachments ? :
401 3 3 if ($text_part and $html_part and @attachments) { }
416 2 1 if $text_part
417 2 1 if $html_part
427 0 13 if $args->{'date'}
428 0 13 if $cc
429 0 13 if $bcc
430 1 12 if $args->{'replyto'}
437 13 0 if (lc $method eq 'local') { }
438 13 0 if ($agent) { }