Dave Rolsky


Antispam::Toolkit::Result - Represents the result of a spam check


version 0.08


  return Antispam::Toolkit::Result->new(
      score   => 2,
      details => [
          q{The user's ip address was found in a list of known spammers},
          q{The user's email address was found in a list of known bad email addresses},


This class represents the result of a spam check. It consists of a score and details associated with that score.

The score is simple a non-negative number. The details are optional, and should be provided as an array reference of strings, each of which describes some aspect of the spam check.


This class provides the following methods:

Antispam::Toolkit::Result->new( ... )

This method constructs a new result object. It accepts the following attributes:

  • score

    This attribute is required, and must be a non-negative number.

  • details

    This attribute can be either a single non-empty string or an array reference of non-empty strings. It is not required.


Returns the score for the result.


Returns a list of strings. This list may be empty.


This object overloads the boolean operator. If the score is greater than 0, it overloads as true, otherwise it overloads as false.


See Antispam::Toolkit for bug reporting details.


Dave Rolsky <autarch@urth.org>


This software is Copyright (c) 2011 by Dave Rolsky.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)