Branch Coverage

blib/lib/Log/Handler/Output/Email.pm
Criterion Covered Total %
branch 10 70 14.2


line true false branch
209 10 0 @_ > 1 ? :
212 0 10 if ($self->{'buffer'} == 0)
216 10 0 if (@$buffer < $self->{'buffer'})
220 0 10 if (@$buffer == $self->{'buffer'})
232 2 0 if ($TEST or not @$buffer)
240 0 0 if ($buf->{'level'} and not $message->{'level'}) { }
0 0 elsif ($buf->{'level'} and $message->{'level'}) { }
245 0 0 if ($LEVEL_BY_STRING{$mlevel} > $LEVEL_BY_STRING{$blevel})
253 0 0 if (defined $string)
262 0 0 @_ > 1 ? :
269 0 0 if ($message->{'level'})
280 0 0 if $smtp
283 0 0 unless ($smtp)
287 0 0 if ($smtp->mail($self->{'from'}))
291 0 0 if ($smtp->to($self->{'to'}))
295 0 0 if ($self->{'cc'})
296 0 0 if ($smtp->cc($self->{'cc'}))
302 0 0 if ($self->{'bcc'})
303 0 0 if ($smtp->bcc($self->{'bcc'}))
309 0 0 if ($smtp->data)
313 0 0 if ($smtp->datasend("From: $self->{'from'}\n"))
317 0 0 if ($smtp->datasend("To: $self->{'to'}\n"))
321 0 0 if ($self->{'cc'})
322 0 0 if ($smtp->datasend("Cc: $self->{'cc'}\n"))
328 0 0 if ($smtp->datasend("Subject: $subject\n"))
332 0 0 if ($smtp->datasend("Date: $date\n"))
336 0 0 if ($smtp->datasend($message->{'message'} . "\n"))
340 0 0 if ($smtp->dataend)
344 0 0 if ($smtp->quit)
348 0 0 if ($success != $expect)
361 0 1 if ($@)
372 0 1 unless ($opts)
446 0 2 unless (ref $opts{'host'})
450 2 0 if ($opts{'subject'})
454 0 2 if (length $opts{'subject'} > 998)