Take me over?
NAME
Antispam::Toolkit::Result - Represents the result of a spam check
VERSION
version 0.08
SYNOPSIS
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},
],
);
DESCRIPTION
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.
METHODS
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.
$result->score()
Returns the score for the result.
$result->details()
Returns a list of strings. This list may be empty.
OVERLOADING
This object overloads the boolean operator. If the score is greater than 0, it overloads as true, otherwise it overloads as false.
BUGS
See Antispam::Toolkit for bug reporting details.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)