Net::Akismet::Protocol - Perl interface to Akismet Protocol - comment and trackback spam fighter
my $akismet = Net::Akismet::Protocol->new( key => 'secret-baba-API-key', url => 'http://example.blog.net/', ); my $verdict = $akismet->check( user_ip => '10.10.10.11', user_agent => 'Mozilla/5.0', comment_content => 'Run, Lola, Run, the spam will catch you!', comment_author => 'dosser', coment_author_email => 'dosser@subway.de', referrer => 'http://lola.home/', ) or die('Is the server here?'); if ( $verdict == 1) { print "I found spam. I am a spam-finder!\n"; } =head1 DESCRIPTION
This module implements the Akismet anti-spam API. It's based on Net::Akismet, but has been rewritten using Moose, and it you allows to use different servers as long as they implement the same REST spec as Akismet. By default, the module will use Typepad Antispam.
Net::Akismet->new(PARAM => ...);
Acceptable parameters:
The API key being verified for use with the API.
The front page or home URL of the instance making the request. For a blog or wiki this would be the front page.
The LWP::UserAgent to use ´ =item ua_string
This will be set as your user agent string at build time if supplied.
Akismet API version in use. Defaults to '1.1'
API host to connect to. defaults to 'api.antispam.typepad.com'
If verification of the key was unsuccessful new() returns undef.
new()
undef
$akismet->check(user_ip => ..., comment_content => ..., ...)
To be or not to be... check is meant to tell you. Give it enough details about the comment and expect 'true', 'false' or undef as a result. 'true' means spam, 'false' means not spam, undef is returned on errror in submission of the comment.
check
'true'
'false'
Acceptable comment characteristics:
Required. Represents the IP address of the comment submitter.
Required. User agent string from the comment submitter's request.
Comment text.
HTTP Referer header.
Referer
Permanent link to the subject of the comment.
May be blank, 'comment', 'trackback', 'pingback', or a made up value like 'registration'.
Name of submitter.
Submitter e-mail.
Submitter web page.
Reports a certain comment as spam. Accepts the same arguments as check().
check()
In case of failed submission returns undef, otherwise - a perl-known truth.
This call is intended for the marking of false positives, things that were incorrectly marked as spam. It takes identical arguments as check() and spam().
spam()
Although almost all comment characteristics are optional, performance can drop dramatically if you exclude certain elements. So please, supply as much comment detail as possible.
Net::Akismet
http://akismet.com/
http://akismet.com/development/api/
Marcus Ramberg <mramberg@cpan.org>
Based on Net::Akismet by Nikolay Bachiyski <nbachiyski@developer.bg>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '´'. Assuming UTF-8
To install Net::Akismet::Protocol, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Akismet::Protocol
CPAN shell
perl -MCPAN -e shell install Net::Akismet::Protocol
For more information on module installation, please visit the detailed CPAN module installation guide.