Condition Coverage

blib/lib/Mail/Sender.pm
Criterion Covered Total %
condition 58 360 16.1


and 2 conditions

line l !l condition
2253 0 0 $self->Connect && $self->Close && 1

and 3 conditions

line !l l&&!r l&&r condition
112 0 0 0 $@ and not $@ =~ /Can't locate /
267 0 0 0 $charset and $str =~ /[^[:ascii:]]/
273 0 0 0 $i < $#parts and $parts[$i + 1] =~ /^\s+$/
316 0 0 0 exists $self->{'supports'}{'DSN'} and exists $self->{'esmtp'}
337 0 0 0 exists $self->{'username'} and not exists $self->{'authid'}
340 0 0 0 exists $self->{'password'} and not exists $self->{'authpwd'}
526 2 1 2 $err and not $err =~ /Local user/i
719 13 3 1 $self->{'replyto'} and not $self->{'reply'}
766 1 1 5 defined $file and $file =~ /\.(.*)$/
792 0 0 0 $_ and /^[123]/
801 0 0 0 $self->{'tls_required'} || $self->{'tls_allowed'} and not $TLS_notsupported
0 0 0 $self->{'tls_required'} || $self->{'tls_allowed'} and not $TLS_notsupported and defined $self->{'supports'}{'STARTTLS'} || defined $self->{'supports'}{'TLS'}
890 1 0 0 $self->{'on_errors'} and $self->{'on_errors'} eq 'die'
1 0 0 exists $self->{'on_errors'} and !defined($self->{'on_errors'}) || $self->{'on_errors'} eq 'undef'
929 1 1 2 $self->{'esmtp'}{'ORCPT'} ne '' and not $self->{'esmtp'}{'ORCPT'} =~ /;/
977 0 0 0 not $self->{'keepconnection'} and $self->{'_data'}
998 0 0 0 defined $hash->{'replyto'} and not defined $hash->{'reply'}
1000 0 0 0 ref $hash->{$key} eq 'HASH' and exists $$self{lc $key}
1073 0 0 0 $Mail::Sender::{'SiteHook'} and not $self->SiteHook
1144 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 1
1148 0 0 0 defined $self->{'charset'} and not defined $self->{'ctype'}
1187 0 0 0 defined $self->{'fake_cc'} and $self->{'fake_cc'}
0 0 0 defined $self->{'cc'} and $self->{'cc'}
1199 0 0 0 defined $Mail::Sender::NO_DATE and $Mail::Sender::NO_DATE
0 0 0 defined $self->{'_headers'} and $self->{'_headers'} =~ /^Date:/m
0 0 0 defined $Mail::Sender::SITE_HEADERS and $Mail::Sender::SITE_HEADERS =~ /^Date:/m
1244 0 0 0 defined $Mail::Sender::NO_MESSAGE_ID and $Mail::Sender::NO_MESSAGE_ID
1248 0 0 0 defined $self->{'createmessageid'} and ref $self->{'createmessageid'} eq 'CODE'
1266 0 0 0 defined $self->{'_headers'} and $self->{'_headers'}
1272 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 2
1282 0 0 0 not $self->{'keepconnection'} and $self->{'_data'}
1298 0 0 0 defined $self->{'type'} and $self->{'type'}
1309 0 0 0 defined $hash->{'replyto'} and not defined $hash->{'reply'}
1311 0 0 0 ref $hash->{$key} eq 'HASH' and exists $$self{lc $key}
1386 0 0 0 $Mail::Sender::{'SiteHook'} and not $self->SiteHook
1456 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 1
1467 0 0 0 defined $self->{'fake_cc'} and $self->{'fake_cc'}
0 0 0 defined $self->{'cc'} and $self->{'cc'}
1481 0 0 0 defined $Mail::Sender::NO_DATE and $Mail::Sender::NO_DATE
0 0 0 defined $self->{'_headers'} and $self->{'_headers'} =~ /^Date:/m
0 0 0 defined $Mail::Sender::SITE_HEADERS and $Mail::Sender::SITE_HEADERS =~ /^Date:/m
1517 0 0 0 defined $Mail::Sender::NO_X_MAILER and $Mail::Sender::NO_X_MAILER
1529 0 0 0 defined $Mail::Sender::NO_MESSAGE_ID and $Mail::Sender::NO_MESSAGE_ID
1533 0 0 0 defined $self->{'createmessageid'} and ref $self->{'createmessageid'} eq 'CODE'
1547 0 0 0 defined $self->{'_headers'} and $self->{'_headers'}
1554 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 2
1566 0 0 0 exists $self->{'socket'} and $self->{'socket'}
1584 0 0 0 ref $self->Open(@_) and ref $self->SendEnc($msg)
0 0 0 ref $self->Open(@_) and ref $self->SendEnc($msg) and ref $self->Close
1643 0 0 0 ref $self->OpenMultipart($hash ? $hash : @_) and ref $self->Body($self->{'b_charset'} || $self->{'charset'}, $self->{'b_encoding'}, $self->{'b_ctype'})
0 0 0 ref $self->OpenMultipart($hash ? $hash : @_) and ref $self->Body($self->{'b_charset'} || $self->{'charset'}, $self->{'b_encoding'}, $self->{'b_ctype'}) and $self->SendEnc($msg)
1674 0 0 0 $ctype =~ m[^text/]i and $encoding =~ /Quoted[_\-]print|Base64/i
1798 0 0 0 defined $charset and $charset
0 0 0 defined $charset and $charset and not $ctype =~ /charset=/i
0 0 0 not defined $charset and $ctype =~ /charset="([^"]+)"/
1821 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1840 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1954 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1969 0 0 0 $disposition and uc $disposition ne 'NONE'
1990 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1993 0 0 0 $fctype =~ m[^text/]i and $encoding =~ /Quoted[_\-]print|Base64/i
2035 0 0 0 not $self->{'bypass_outlook_bug'} and $self->{'encoding'} =~ /Quoted[_\-]print/i
2040 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
2183 0 0 0 $_ and /^[123]/
2250 0 0 0 exists $self->{'on_errors'} and !defined($self->{'on_errors'}) || $self->{'on_errors'} eq 'undef'
0 0 0 exists $self->{'on_errors'} and $self->{'on_errors'} eq 'die'

or 2 conditions

line l !l condition
331 0 0 uc $self->{'auth'} || 'LOGIN'
489 2 1 shift() || ''
502 1 1 shift() || ''
510 1 1 shift() || ''
522 4 1 shift() || ''
523 4 1 shift() || ''
524 3 2 shift() || ''
529 1 1 $err ||= 'Error'
539 1 1 shift() || ''
564 1 1 shift() || ''
571 1 1 shift() || ''
602 2 1 shift() || ''
603 1 2 shift() || ''
617 1 1 shift() || ''
630 1 1 shift() || ''
641 2 1 shift() || ''
642 1 2 shift() || ''
649 1 1 shift() || ''
656 1 1 shift() || ''
669 1 1 shift() || ''
699 17 0 getservbyname('smtp', 'tcp') || 25
767 4 1 $CTypes{uc $1} || 'application/octet-stream'
779 0 0 $self->{'timeout'} || 120
1084 0 0 $self->{'fromaddr'} || ''
0 0 $self->{'esmtp'}{'_MAIL_FROM'} || ''
1129 0 0 $addr || ''
0 0 $self->{'esmtp'}{'_RCPT_TO'} || ''
1865 0 0 shift() || $hash->{'charset'} || 'US-ASCII'
1867 0 0 shift() || $hash->{'encoding'} || $self->{'encoding'} || '7BIT'
1868 0 0 shift() || $hash->{'ctype'} || $self->{'ctype'} || 'text/plain'
2177 0 0 $self->{'timeout'} || 120
2205 0 0 $_[1] || 'localhost'

or 3 conditions

line l !l&&r !l&&!r condition
107 0 0 2 $compiled or -e $config
219 1 0 0 eval { do { getpwuid $< unless getlogin } } || $ENV{'USERNAME'}
264 0 0 0 not defined $str or $str eq ''
275 0 0 0 $part =~ /[^[:ascii:]]/ or $part =~ /[\r\n\t]/
801 0 0 0 $self->{'tls_required'} || $self->{'tls_allowed'}
0 0 0 defined $self->{'supports'}{'STARTTLS'} || defined $self->{'supports'}{'TLS'}
868 0 0 0 $self->{'auth'} or $self->{'username'}
890 0 0 1 $self->{'die_on_errors'} or $self->{'on_errors'} and $self->{'on_errors'} eq 'die'
0 0 0 !defined($self->{'on_errors'}) || $self->{'on_errors'} eq 'undef'
1078 0 0 0 $self->{'socket'} || $self->Connect
1151 0 0 0 defined $self->{'encoding'} or defined $self->{'ctype'}
1199 0 0 0 defined $Mail::Sender::NO_DATE and $Mail::Sender::NO_DATE or defined $self->{'_headers'} and $self->{'_headers'} =~ /^Date:/m
0 0 0 defined $Mail::Sender::NO_DATE and $Mail::Sender::NO_DATE or defined $self->{'_headers'} and $self->{'_headers'} =~ /^Date:/m or defined $Mail::Sender::SITE_HEADERS and $Mail::Sender::SITE_HEADERS =~ /^Date:/m
1221 0 0 0 $1 || $self->{'from'}
1226 0 0 0 $1 || $self->{'fromaddr'}
1230 0 0 0 $1 || $self->{'fromaddr'}
1247 0 0 0 not defined $self->{'messageid'} or $self->{'messageid'} eq ''
1391 0 0 0 $self->{'socket'} || $self->Connect
1481 0 0 0 defined $Mail::Sender::NO_DATE and $Mail::Sender::NO_DATE or defined $self->{'_headers'} and $self->{'_headers'} =~ /^Date:/m
0 0 0 defined $Mail::Sender::NO_DATE and $Mail::Sender::NO_DATE or defined $self->{'_headers'} and $self->{'_headers'} =~ /^Date:/m or defined $Mail::Sender::SITE_HEADERS and $Mail::Sender::SITE_HEADERS =~ /^Date:/m
1503 0 0 0 $1 || $self->{'from'}
1508 0 0 0 $1 || $self->{'fromaddr'}
1512 0 0 0 $1 || $self->{'fromaddr'}
1532 0 0 0 not defined $self->{'messageid'} or $self->{'messageid'} eq ''
1635 0 0 0 $file =~ /^&/ or -e $file
1643 0 0 0 $self->{'b_charset'} || $self->{'charset'}
1649 0 0 0 $ctype || GuessCType($filename, $file)
1650 0 0 0 $encoding || ($ctype =~ m[^text/]i ? 'Quoted-printable' : 'Base64')
1833 0 0 0 $disposition eq '' or uc $disposition eq 'NONE'
1917 0 0 0 $file =~ /^&/ or -e $file
2093 0 0 0 $_[0] or not $self->{'keepconnection'}
2250 0 0 0 !defined($self->{'on_errors'}) || $self->{'on_errors'} eq 'undef'