Net::Defensio::Response - Object for holding response to a Net::Defensio request.
my $r = $defensio->audit_comment( ..... ) or die $defensio->errstr; if ($r->success) { print "Spaminess: " . $r->spaminess . "\n"; } else { print "Failure: " . $r->message . "\n"; }
Constructs a new Net::Defensio::Response object, initializing it with the parameter data given.
Net::Defensio::Response
Returns a true value when the 'status' member is set to 'true'. Returns false otherwise.
Returns a true value when the 'spam' member is set to 'true'. Only useful for responses to 'audit-comment' requests.
Returns a true value when the 'spam' member is set to 'false'. Only useful for responses to 'audit-comment' requests.
Holds the name of the 'action' for the Defensio API request. Set for all response objects.
Holds the status member of a Defensio API response. Will be set to either 'success' or 'fail'. Set for all response objects.
Holds the message member of a Defensio API response. Set for all response objects, but may be an empty string.
Holds the api-version member of a Defensio API response. Set for all response objects.
For 'audit-comment' requests, this contains a boolean value, represented as 'true' or 'false'.
For 'get-stats' requests, this contains an integer of the number of messages Defensio has rated as spam.
For 'audit-comment' requests. Holds the floating-point value of the "spaminess" of the comment.
For 'audit-comment' requests. Holds the signature member of the Defensio response.
For 'get-stats' requests, this contains an integer of the number of messages Defensio has rated as ham (legitimate comments).
For 'get-stats' requests, this contains an integer of the number of messages that have been submitted to Defensio for retraining as spam.
For 'get-stats' requests, this contains an integer of the number of messages that have been submitted to Defensio for retraining as non-spam.
For 'get-stats' requests, this contains a floating-point number representing the accuracy of the Defensio filters (from 0 to 1; 0 being 100% inaccurate, 1 being 100% accurate).
For 'get-stats' requests, this contains a boolean value indicating whether the Defensio filter is still in 'learning mode' for the account being used (either set to 'true' or 'false').
For 'get-stats' requests, this contains a message explaining why the Defensio filter is still in 'learning mode'. Only relevant when 'learning' is returned as 'true'.
Copyright 2007 Brad Choate, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Defensio, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Defensio
CPAN shell
perl -MCPAN -e shell install Net::Defensio
For more information on module installation, please visit the detailed CPAN module installation guide.