r20735 - in /trunk/libnet-akismet-perl: Changes META.yml README debian/changelog debian/copyright lib/Net/Akismet.pm
yvesago-guest at users.alioth.debian.org
yvesago-guest at users.alioth.debian.org
Fri Jun 6 07:17:33 UTC 2008
Author: yvesago-guest
Date: Fri Jun 6 07:17:33 2008
New Revision: 20735
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20735
Log:
* new upstream release
* update author email in copyright
* add 2008 in author copyright
Modified:
trunk/libnet-akismet-perl/Changes
trunk/libnet-akismet-perl/META.yml
trunk/libnet-akismet-perl/README
trunk/libnet-akismet-perl/debian/changelog
trunk/libnet-akismet-perl/debian/copyright
trunk/libnet-akismet-perl/lib/Net/Akismet.pm
Modified: trunk/libnet-akismet-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-akismet-perl/Changes?rev=20735&op=diff
==============================================================================
--- trunk/libnet-akismet-perl/Changes (original)
+++ trunk/libnet-akismet-perl/Changes Fri Jun 6 07:17:33 2008
@@ -1,4 +1,11 @@
Revision history for Perl extension Net::Akismet.
+
+0.05
+ - mention in the docs about the host/version feature
+
+0.04 Thu Jun 5 19:58:41 EEST 2008
+ - allow service host and version to be changed from the constructor
+ - SYNOPSIS fixes by John Belmonte
0.03 Mon Aug 27 10:28:28 EEST 2007
- proper user agent handling, patch by John Belmonte, rt bug #28939
@@ -11,4 +18,4 @@
- original version; created by h2xs 1.23 with options
-AX --skip-exporter --use-new-tests -n Net::Akismet
-$Id: Changes 33 2007-08-27 07:30:07Z humperdink $
+$Id: Changes 38 2008-06-05 17:15:12Z humperdink $
Modified: trunk/libnet-akismet-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-akismet-perl/META.yml?rev=20735&op=diff
==============================================================================
--- trunk/libnet-akismet-perl/META.yml (original)
+++ trunk/libnet-akismet-perl/META.yml Fri Jun 6 07:17:33 2008
@@ -1,11 +1,11 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Net-Akismet
-version: 0.03
+version: 0.05
version_from: lib/Net/Akismet.pm
installdirs: site
requires:
LWP: 5.09
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30_01
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: trunk/libnet-akismet-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-akismet-perl/README?rev=20735&op=diff
==============================================================================
--- trunk/libnet-akismet-perl/README (original)
+++ trunk/libnet-akismet-perl/README Fri Jun 6 07:17:33 2008
@@ -1,4 +1,4 @@
-Net-Akismet version 0.01
+Net-Akismet version 0.05
========================
Net::Akismet is meant to provide perl interface to the Akismet web service.
@@ -32,4 +32,4 @@
it under the same terms as Perl itself, either Perl version 5.8.7 or,
at your option, any later version of Perl 5 you may have available.
-$Id: README 15 2006-01-11 13:31:47Z humperdink $
+$Id: README 38 2008-06-05 17:15:12Z humperdink $
Modified: trunk/libnet-akismet-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-akismet-perl/debian/changelog?rev=20735&op=diff
==============================================================================
--- trunk/libnet-akismet-perl/debian/changelog (original)
+++ trunk/libnet-akismet-perl/debian/changelog Fri Jun 6 07:17:33 2008
@@ -1,3 +1,11 @@
+libnet-akismet-perl (0.05-1) unstable; urgency=low
+
+ * new upstream release
+ * update author email in copyright
+ * add 2008 in author copyright
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Fri, 06 Jun 2008 09:09:22 +0200
+
libnet-akismet-perl (0.03-1) unstable; urgency=low
* Initial Release (Closes: #477502)
Modified: trunk/libnet-akismet-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-akismet-perl/debian/copyright?rev=20735&op=diff
==============================================================================
--- trunk/libnet-akismet-perl/debian/copyright (original)
+++ trunk/libnet-akismet-perl/debian/copyright Fri Jun 6 07:17:33 2008
@@ -2,10 +2,10 @@
X-Debianized-By: AGOSTINI Yves <agostini at univ-metz.fr>
X-Debianized-Date: Wed, 23 Apr 2008 15:29:04 +0200
X-Source-Downloaded-From: http://search.cpan.org/dist/Net-Akismet/
-X-Upstream-Author: Nikolay Bachiyski <nbachiyski at developer.bg>
+X-Upstream-Author: Nikolay Bachiyski <nb at nikolay.bg>
Files: *
-Copyright: Copyright (C) 2006, 2007 by Nikolay Bachiyski
+Copyright: Copyright (C) 2006, 2007, 2008 by Nikolay Bachiyski
License: GPL-1+ | Artistic
Copyright (C) 2006, 2007 by Nikolay Bachiyski
.
Modified: trunk/libnet-akismet-perl/lib/Net/Akismet.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-akismet-perl/lib/Net/Akismet.pm?rev=20735&op=diff
==============================================================================
--- trunk/libnet-akismet-perl/lib/Net/Akismet.pm (original)
+++ trunk/libnet-akismet-perl/lib/Net/Akismet.pm Fri Jun 6 07:17:33 2008
@@ -14,7 +14,7 @@
use LWP::UserAgent;
use HTTP::Request::Common;
-our $VERSION = '0.03';
+our $VERSION = '0.05';
my $UA_SUFFIX = "Perl-Net-Akismet/$VERSION";
@@ -26,11 +26,11 @@
) or die('Key verification failure!');
my $verdict = $akismet->check(
- USER_IP => '10.10.10.11',
- USER_AGENT => 'Mozilla/5.0',
+ USER_IP => '10.10.10.11',
+ COMMENT_USER_AGENT => 'Mozilla/5.0',
COMMENT_CONTENT => 'Run, Lola, Run, the spam will catch you!',
COMMENT_AUTHOR => 'dosser',
- COMENT_AUTHOR_EMAIL => 'dosser at subway.de',
+ COMMENT_AUTHOR_EMAIL => 'dosser at subway.de',
REFERRER => 'http://lola.home/',
) or die('Is the server here?');
@@ -66,6 +66,14 @@
your-killer-app/0.042 Perl-Net-Akismet/0.01 libwww-perl/5.8
Otherwise just Akismet Perl's user agent string will be sent.
+
+=item SERVICE_HOST
+
+If supplied, the host of the service API. The default is rest.akismet.com
+
+=item SERVICE_VERSION
+
+If supplied, the API version. The default is 1.1
=back
@@ -91,6 +99,9 @@
$agent = "$params{USER_AGENT} $agent" if $params{USER_AGENT};
$self->{ua}->agent($agent);
+ $self->{SERVICE_HOST} = $params{SERVICE_HOST} || 'rest.akismet.com';
+ $self->{SERVICE_VERSION} = $params{SERVICE_VERSION} || '1.1';
+
bless $self, $class;
return $self->_verify_key()? $self : undef;
@@ -100,9 +111,8 @@
my $self = shift;
-
my $response = $self->{ua}->request(
- POST 'http://rest.akismet.com/1.1/verify-key',
+ POST "http://$self->{SERVICE_HOST}/$self->{SERVICE_VERSION}/verify-key",
[
key => $self->{KEY},
blog => $self->{URL},
@@ -216,8 +226,11 @@
$comment->{USER_IP} && $comment->{COMMENT_USER_AGENT} || return undef;
+ # accomodate common misspelling
+ $comment->{REFERRER} = $comment->{REFERER} if !$comment->{REFERRER} && $comment->{REFERER};
+
my $response = $self->{ua}->request(
- POST "http://$self->{KEY}.rest.akismet.com/1.1/$action",
+ POST "http://$self->{KEY}.$self->{SERVICE_HOST}/$self->{SERVICE_VERSION}/$action",
[
blog => $self->{URL},
user_ip => $comment->{USER_IP},
@@ -259,7 +272,7 @@
=head1 AUTHOR
-Nikolay Bachiyski E<lt>nbachiyski at developer.bgE<gt>
+Nikolay Bachiyski E<lt>nb at nikolay.bgE<gt>
=head2 Help, modifications and bugfixes from:
@@ -273,10 +286,10 @@
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2006, 2007 by Nikolay Bachiyski
+Copyright (C) 2006, 2007, 2008 by Nikolay Bachiyski
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
-$Id: Akismet.pm 32 2007-08-27 07:21:34Z humperdink $
-
-=cut
+$Id: Akismet.pm 38 2008-06-05 17:15:12Z humperdink $
+
+=cut
More information about the Pkg-perl-cvs-commits
mailing list