Condition Coverage

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


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
110 0 0 0 $@ and not $@ =~ /Can't locate /
265 0 0 0 $charset and $str =~ /[^[:ascii:]]/
271 0 0 0 $i < $#parts and $parts[$i + 1] =~ /^\s+$/
314 0 0 0 exists $self->{'supports'}{'DSN'} and exists $self->{'esmtp'}
335 0 0 0 exists $self->{'username'} and not exists $self->{'authid'}
338 0 0 0 exists $self->{'password'} and not exists $self->{'authpwd'}
524 2 1 2 $err and not $err =~ /Local user/i
717 13 3 1 $self->{'replyto'} and not $self->{'reply'}
764 1 1 5 defined $file and $file =~ /\.(.*)$/
790 0 0 0 $_ and /^[123]/
799 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'}
888 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'
927 1 1 2 $self->{'esmtp'}{'ORCPT'} ne '' and not $self->{'esmtp'}{'ORCPT'} =~ /;/
975 0 0 0 not $self->{'keepconnection'} and $self->{'_data'}
996 0 0 0 defined $hash->{'replyto'} and not defined $hash->{'reply'}
998 0 0 0 ref $hash->{$key} eq 'HASH' and exists $$self{lc $key}
1071 0 0 0 $Mail::Sender::{'SiteHook'} and not $self->SiteHook
1142 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 1
1146 0 0 0 defined $self->{'charset'} and not defined $self->{'ctype'}
1185 0 0 0 defined $self->{'fake_cc'} and $self->{'fake_cc'}
0 0 0 defined $self->{'cc'} and $self->{'cc'}
1197 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
1242 0 0 0 defined $Mail::Sender::NO_MESSAGE_ID and $Mail::Sender::NO_MESSAGE_ID
1246 0 0 0 defined $self->{'createmessageid'} and ref $self->{'createmessageid'} eq 'CODE'
1264 0 0 0 defined $self->{'_headers'} and $self->{'_headers'}
1270 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 2
1280 0 0 0 not $self->{'keepconnection'} and $self->{'_data'}
1296 0 0 0 defined $self->{'type'} and $self->{'type'}
1307 0 0 0 defined $hash->{'replyto'} and not defined $hash->{'reply'}
1309 0 0 0 ref $hash->{$key} eq 'HASH' and exists $$self{lc $key}
1384 0 0 0 $Mail::Sender::{'SiteHook'} and not $self->SiteHook
1454 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 1
1465 0 0 0 defined $self->{'fake_cc'} and $self->{'fake_cc'}
0 0 0 defined $self->{'cc'} and $self->{'cc'}
1479 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
1515 0 0 0 defined $Mail::Sender::NO_X_MAILER and $Mail::Sender::NO_X_MAILER
1527 0 0 0 defined $Mail::Sender::NO_MESSAGE_ID and $Mail::Sender::NO_MESSAGE_ID
1531 0 0 0 defined $self->{'createmessageid'} and ref $self->{'createmessageid'} eq 'CODE'
1545 0 0 0 defined $self->{'_headers'} and $self->{'_headers'}
1552 0 0 0 $self->{'debug'} and $self->{'debug_level'} <= 2
1564 0 0 0 exists $self->{'socket'} and $self->{'socket'}
1582 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
1641 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)
1672 0 0 0 $ctype =~ m[^text/]i and $encoding =~ /Quoted[_\-]print|Base64/i
1796 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="([^"]+)"/
1819 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1838 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1952 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1967 0 0 0 $disposition and uc $disposition ne 'NONE'
1988 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
1991 0 0 0 $fctype =~ m[^text/]i and $encoding =~ /Quoted[_\-]print|Base64/i
2033 0 0 0 not $self->{'bypass_outlook_bug'} and $self->{'encoding'} =~ /Quoted[_\-]print/i
2038 0 0 0 $self->{'debug'} and $self->{'debug_level'} == 3
2181 0 0 0 $_ and /^[123]/
2248 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
329 0 0 uc $self->{'auth'} || 'LOGIN'
487 2 1 shift() || ''
500 1 1 shift() || ''
508 1 1 shift() || ''
520 4 1 shift() || ''
521 4 1 shift() || ''
522 3 2 shift() || ''
527 1 1 $err ||= 'Error'
537 1 1 shift() || ''
562 1 1 shift() || ''
569 1 1 shift() || ''
600 2 1 shift() || ''
601 1 2 shift() || ''
615 1 1 shift() || ''
628 1 1 shift() || ''
639 2 1 shift() || ''
640 1 2 shift() || ''
647 1 1 shift() || ''
654 1 1 shift() || ''
667 1 1 shift() || ''
697 17 0 getservbyname('smtp', 'tcp') || 25
765 4 1 $CTypes{uc $1} || 'application/octet-stream'
777 0 0 $self->{'timeout'} || 120
1082 0 0 $self->{'fromaddr'} || ''
0 0 $self->{'esmtp'}{'_MAIL_FROM'} || ''
1127 0 0 $addr || ''
0 0 $self->{'esmtp'}{'_RCPT_TO'} || ''
1863 0 0 shift() || $hash->{'charset'} || 'US-ASCII'
1865 0 0 shift() || $hash->{'encoding'} || $self->{'encoding'} || '7BIT'
1866 0 0 shift() || $hash->{'ctype'} || $self->{'ctype'} || 'text/plain'
2175 0 0 $self->{'timeout'} || 120
2203 0 0 $_[1] || 'localhost'

or 3 conditions

line l !l&&r !l&&!r condition
105 0 0 2 $compiled or -e $config
217 1 0 0 eval { do { getpwuid $< unless getlogin } } || $ENV{'USERNAME'}
262 0 0 0 not defined $str or $str eq ''
273 0 0 0 $part =~ /[^[:ascii:]]/ or $part =~ /[\r\n\t]/
799 0 0 0 $self->{'tls_required'} || $self->{'tls_allowed'}
0 0 0 defined $self->{'supports'}{'STARTTLS'} || defined $self->{'supports'}{'TLS'}
866 0 0 0 $self->{'auth'} or $self->{'username'}
888 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'
1076 0 0 0 $self->{'socket'} || $self->Connect
1149 0 0 0 defined $self->{'encoding'} or defined $self->{'ctype'}
1197 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
1219 0 0 0 $1 || $self->{'from'}
1224 0 0 0 $1 || $self->{'fromaddr'}
1228 0 0 0 $1 || $self->{'fromaddr'}
1245 0 0 0 not defined $self->{'messageid'} or $self->{'messageid'} eq ''
1389 0 0 0 $self->{'socket'} || $self->Connect
1479 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
1501 0 0 0 $1 || $self->{'from'}
1506 0 0 0 $1 || $self->{'fromaddr'}
1510 0 0 0 $1 || $self->{'fromaddr'}
1530 0 0 0 not defined $self->{'messageid'} or $self->{'messageid'} eq ''
1633 0 0 0 $file =~ /^&/ or -e $file
1641 0 0 0 $self->{'b_charset'} || $self->{'charset'}
1647 0 0 0 $ctype || GuessCType($filename, $file)
1648 0 0 0 $encoding || ($ctype =~ m[^text/]i ? 'Quoted-printable' : 'Base64')
1831 0 0 0 $disposition eq '' or uc $disposition eq 'NONE'
1915 0 0 0 $file =~ /^&/ or -e $file
2091 0 0 0 $_[0] or not $self->{'keepconnection'}
2248 0 0 0 !defined($self->{'on_errors'}) || $self->{'on_errors'} eq 'undef'