Mail-SpamAssassin-SimpleClient

 view release on metacpan or  search on metacpan

lib/Mail/SpamAssassin/SimpleClient.pm  view on Meta::CPAN



sub new {
  my ($class, $arg) = @_;
  $arg ||= {};

  $arg->{host} = 'localhost' unless defined $arg->{host};
  $arg->{port} = 783 unless defined $arg->{port};
  $arg->{timeout} = 120 unless defined $arg->{timeout};

  bless $arg => $class;
}


sub check {
  my ($self, $message) = @_;

  local $SIG{ALRM} = sub {
    Carp::croak "SpamAssassin failed to respond within $self->{timeout}s";
  };

lib/Mail/SpamAssassin/SimpleClient/Result.pm  view on Meta::CPAN

  $Mail::SpamAssassin::SimpleClient::Result::VERSION = '0.102';
}
# ABSTRACT: the results of checking a message

use Carp ();


sub new {
  my ($class, $arg) = @_;

  bless $arg => $class;
}


sub is_spam { $_[0]->{is_spam} }


sub score { $_[0]->{score} }

sub threshold { $_[0]->{threshold} }

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 2.456 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )