Branch Coverage

blib/lib/SMS/Handler/Email.pm
Criterion Covered Total %
branch 0 290 0.0


line true false branch
392 0 0 if $$self{'pops'}
393 0 0 if $$self{'e'}
410 0 0 if $Debug
412 0 0 unless $$self{'_state'}
420 0 0 if $Debug
427 0 0 unless $$ref =~ /[[:lower:]]/
658 0 0 if ($self{'addr'})
688 0 0 unless $tag eq 'img'
690 0 0 if $$attr{'alt'}
693 0 0 if length $$ret{'body'} > $$ret{'part'} * $$ret{'maxfetch'}
703 0 0 if length $$ret{'body'} > $$ret{'part'} * $$ret{'maxfetch'}
740 0 0 if $Debug
763 0 0 if $Debug
797 0 0 unless defined $1 and defined $2
799 0 0 if $Debug
831 0 0 unless defined $1
836 0 0 if $Debug
841 0 0 unless ($self->_authen($hsms, $source))
843 0 0 if $Debug
847 0 0 if ($email) { }
850 0 0 if $Debug
855 0 0 if $Debug
860 0 0 $$self{'num'} == 1 ? :
890 0 0 unless defined $1
895 0 0 unless (exists $SupportedLanguages{$Languages{uc $1}})
897 0 0 if $Debug
903 0 0 if $Debug
932 0 0 unless defined $1 and defined $2
937 0 0 if $Debug
944 0 0 if ($self->_authen($hsms, $source) and $self->_deliver($hsms, $source, $self->_expanded_addresses($to), $subject))
948 0 0 if $Debug
950 0 0 if ($$self{'num'} == 1) { }
992 0 0 if (exists $$self{'_state'}{'login'}) { }
994 0 0 if ($self->_authen($hsms, $source))
997 0 0 if $Debug
998 0 0 if ($$self{'num'} == 1) { }
1000 0 0 $last ? :
1009 0 0 $last ? :
1020 0 0 if $Debug
1026 0 0 if $Debug
1055 0 0 defined $cmd ? :
0 0 if $Debug
1065 0 0 if ($cmd)
1068 0 0 unless exists $$self{'cmds'}{$cmd}
1072 0 0 unless @list
1104 0 0 if ($self->_dele($hsms, $source) and $self->_quit($hsms, $source))
1107 0 0 if $Debug
1108 0 0 if ($$self{'num'} == 1) { }
1158 0 0 if (defined $$self{'msg'}) { }
1169 0 0 if ($self->_fetch($hsms, $source))
1186 0 0 if ($$self{'head'}->get('Cc'))
1192 0 0 if ($$self{'head'}->get('To'))
1218 0 0 if ($$self{'mime'}) { }
1227 0 0 if ($self->_deliver($hsms, $source, _addresses($$self{'head'}->get('Reply-To') || $$self{'head'}->get('From')), $sub))
1232 0 0 if $Debug
1240 0 0 if $Debug
1272 0 0 if (defined $$self{'msg'}) { }
1282 0 0 if ($self->_fetch($hsms, $source))
1299 0 0 if ($$self{'head'}->get('Cc'))
1305 0 0 if ($$self{'head'}->get('To'))
1331 0 0 if ($$self{'mime'}) { }
1340 0 0 $$self{'head'}->get('Cc') ? :
0 0 if ($self->_deliver($hsms, $source, _addresses(($$self{'head'}->get('Reply-To') || $$self{'head'}->get('From')) . ($$self{'head'}->get('Cc') ? ',' . $$self{'head'}->get('Cc') : '')), $sub))
1348 0 0 if $Debug
1356 0 0 if $Debug
1380 0 0 unless defined $4
1391 0 0 if (defined $$self{'msg'}) { }
1401 0 0 if ($self->_fetch($hsms, $source))
1417 0 0 if ($$self{'head'}->get('Cc'))
1423 0 0 if ($$self{'head'}->get('To'))
1450 0 0 if ($$self{'mime'}) { }
1460 0 0 if ($self->_deliver($hsms, $source, $self->_expanded_addresses($to), $sub))
1463 0 0 if $Debug
1471 0 0 if $Debug
1501 0 0 if (defined $$self{'msg'}) { }
1511 0 0 if ($self->_fetch($hsms, $source) and $self->_translate($hsms, $source) and $self->_truncate($hsms, $source))
1532 0 0 if ($$self{'head'}->get('X-SMS-From'))
1540 0 0 if $Debug
1627 0 0 unless ($fh->close)
1629 0 0 if $Debug
1634 0 0 if $Debug
1642 0 0 if $Debug
1644 0 0 if $Debug
1653 0 0 if $Debug
1658 0 0 if (defined $$self{'_state'}{'alias'}{lc $a->address}) { }
1669 0 0 if $Debug
1681 0 0 if (length $$msg > $$self{'maxlen'}) { }
1694 0 0 unless $self->_do_answer($hsms, $msg)
1724 0 0 unless $$self{'pops'} or $self->_authen($hsms, $source)
1729 0 0 unless ($$self{'pops'}->get($$self{'msg'}, $fh))
1731 0 0 if $Debug
1744 0 0 if ($error)
1746 0 0 if $Debug
1758 0 0 if lc $$self{'e'}->head->get('Content-Type') eq 'multipart/alternative'
1778 0 0 if $Debug
1789 0 0 if ($e and $e->head->get('Content-Type') and $e->head->get('Content-Type') =~ /charset="([^\"]+)"/) { }
0 0 elsif ($$self{'head'}->get('Content-Type') and $$self{'head'}->get('Content-Type') =~ /charset="([^\"]+)"/) { }
1795 0 0 if $Debug
1802 0 0 if $Debug
1807 0 0 if $Debug
1820 0 0 unless ($self->_fetch_helper($hsms, $source, $$self{'e'}))
1828 0 0 if ($$self{'compact'})
1846 0 0 if (length $$self{'body'} < ($$self{'part'} - 1) * $$self{'maxfetch'})
1854 0 0 if (length $$self{'body'} > $$self{'maxfetch'})
1870 0 0 if length $$self{'body'} > $$self{'part'} * $$self{'maxfetch'}
1874 0 0 if (my(@parts) = $ent->parts) { }
0 0 elsif (my $body = $ent->bodyhandle) { }
1878 0 0 if length $$self{'body'} > $$self{'part'} * $$self{'maxfetch'}
1881 0 0 unless $ret
1887 0 0 if $Debug
1889 0 0 if ($type eq 'text/plain') { }
0 0 elsif ($type eq 'text/html') { }
1921 0 0 /(\d+)-(\d+)/ ? :
1924 0 0 unless $$self{'pops'} or $self->_authen($hsms, $source)
1929 0 0 unless ($$self{'pops'}->delete($_))
1931 0 0 if $Debug
1938 0 0 unless (defined($$self{'num'} = ($$self{'pops'}->popstat)[0]))
1940 0 0 if $Debug
1953 0 0 unless defined $$self{'pops'}
1955 0 0 unless ($$self{'pops'}->quit)
1957 0 0 if $Debug
1973 0 0 unless ($$self{'pops'})
1975 0 0 if $Debug
1980 0 0 unless ($$self{'pops'}->user($$self{'_state'}{'login'}))
1982 0 0 if $Debug
1987 0 0 unless ($$self{'num'} = $$self{'pops'}->pass($self->_crypt($$self{'_state'}{'passwd'})))
1990 0 0 if $Debug
2012 0 0 unless ($smtp)
2014 0 0 if $Debug
2019 0 0 unless ($smtp->mail($$self{'_state'}{'login'}))
2021 0 0 if $Debug
2029 0 0 unless ($smtp->to($_))
2031 0 0 if $Debug
2053 0 0 if ($$self{'e'})
2060 0 0 unless ($smtp->data)
2062 0 0 if $Debug
2067 0 0 unless ($smtp->datasend($e->as_string))
2069 0 0 if $Debug
2074 0 0 unless ($smtp->dataend)
2076 0 0 if $Debug
2081 0 0 unless ($smtp->quit)
2083 0 0 if $Debug
2146 0 0 if ($$hsms{'short_message'} =~ s/^(\(\d+\) )?\s*([^\.\(\)][^\(]*)\(([^\)]*)\)\s*//)
2149 0 0 if $Debug
2150 0 0 defined $3 ? :