r72647 - in /trunk/libwww-wikipedia-perl: Changes META.yml debian/changelog debian/compat debian/control lib/WWW/Wikipedia.pm
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Fri Apr 15 20:57:21 UTC 2011
Author: carnil
Date: Fri Apr 15 20:57:12 2011
New Revision: 72647
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=72647
Log:
* New upstream release
* Bump Debhelper compat level to 8.
* debian/control: Bump versioned Build-Depends on debhelper to (>= 8).
Modified:
trunk/libwww-wikipedia-perl/Changes
trunk/libwww-wikipedia-perl/META.yml
trunk/libwww-wikipedia-perl/debian/changelog
trunk/libwww-wikipedia-perl/debian/compat
trunk/libwww-wikipedia-perl/debian/control
trunk/libwww-wikipedia-perl/lib/WWW/Wikipedia.pm
Modified: trunk/libwww-wikipedia-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-wikipedia-perl/Changes?rev=72647&op=diff
==============================================================================
--- trunk/libwww-wikipedia-perl/Changes (original)
+++ trunk/libwww-wikipedia-perl/Changes Fri Apr 15 20:57:12 2011
@@ -1,4 +1,9 @@
Revision history for Perl extension WWW::Wikipedia.
+
+2.00 Tue Apr 05 2011
+ - use decoded_content() rather than just content() (RT #66337)
+ - parse raw text to get proper redirect link (RT #66337)
+ - try to catch self-redirects (RT #66337)
1.99 Wed Feb 16 2011
- Fix up title in entry and provide an accessor for the value
Modified: trunk/libwww-wikipedia-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-wikipedia-perl/META.yml?rev=72647&op=diff
==============================================================================
--- trunk/libwww-wikipedia-perl/META.yml (original)
+++ trunk/libwww-wikipedia-perl/META.yml Fri Apr 15 20:57:12 2011
@@ -26,4 +26,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/edsu/www-wikipedia
-version: 1.99
+version: 2.00
Modified: trunk/libwww-wikipedia-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-wikipedia-perl/debian/changelog?rev=72647&op=diff
==============================================================================
--- trunk/libwww-wikipedia-perl/debian/changelog (original)
+++ trunk/libwww-wikipedia-perl/debian/changelog Fri Apr 15 20:57:12 2011
@@ -1,3 +1,11 @@
+libwww-wikipedia-perl (2.00-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * Bump Debhelper compat level to 8.
+ * debian/control: Bump versioned Build-Depends on debhelper to (>= 8).
+
+ -- Salvatore Bonaccorso <carnil at debian.org> Fri, 15 Apr 2011 22:56:57 +0200
+
libwww-wikipedia-perl (1.99-1) unstable; urgency=low
* New upstream release
Modified: trunk/libwww-wikipedia-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-wikipedia-perl/debian/compat?rev=72647&op=diff
==============================================================================
--- trunk/libwww-wikipedia-perl/debian/compat (original)
+++ trunk/libwww-wikipedia-perl/debian/compat Fri Apr 15 20:57:12 2011
@@ -1,1 +1,1 @@
-7
+8
Modified: trunk/libwww-wikipedia-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-wikipedia-perl/debian/control?rev=72647&op=diff
==============================================================================
--- trunk/libwww-wikipedia-perl/debian/control (original)
+++ trunk/libwww-wikipedia-perl/debian/control Fri Apr 15 20:57:12 2011
@@ -1,7 +1,7 @@
Source: libwww-wikipedia-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7.0.50)
+Build-Depends: debhelper (>= 8)
Build-Depends-Indep: perl, libwww-perl, liburi-perl, libtext-autoformat-perl, libtest-pod-perl, libtest-pod-coverage-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Nathan Handler <nhandler at ubuntu.com>,
Modified: trunk/libwww-wikipedia-perl/lib/WWW/Wikipedia.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-wikipedia-perl/lib/WWW/Wikipedia.pm?rev=72647&op=diff
==============================================================================
--- trunk/libwww-wikipedia-perl/lib/WWW/Wikipedia.pm (original)
+++ trunk/libwww-wikipedia-perl/lib/WWW/Wikipedia.pm Fri Apr 15 20:57:12 2011
@@ -8,7 +8,7 @@
use base qw( LWP::UserAgent );
-our $VERSION = '1.99';
+our $VERSION = '2.00';
use constant WIKIPEDIA_URL =>
'http://%s.wikipedia.org/w/index.php?title=%s&action=raw';
@@ -148,19 +148,19 @@
croak( "search() requires you pass in a string" ) if !defined( $string );
- $string = utf8::is_utf8( $string )
+ my $enc_string = utf8::is_utf8( $string )
? URI::Escape::uri_escape_utf8( $string )
: URI::Escape::uri_escape( $string );
- my $src = sprintf( WIKIPEDIA_URL, $self->language(), $string );
+ my $src = sprintf( WIKIPEDIA_URL, $self->language(), $enc_string );
my $response = $self->get( $src );
if ( $response->is_success() ) {
- my $entry = WWW::Wikipedia::Entry->new( $response->content(), $src );
+ my $entry = WWW::Wikipedia::Entry->new( $response->decoded_content(), $src );
# look for a wikipedia style redirect and process if necessary
+ # try to catch self-redirects
return $self->search( $1 )
- if $self->follow_redirects
- && $entry->text() =~ /^#REDIRECT ([^\r\n]+)/is;
+ if $self->follow_redirects && $entry->raw() =~ /^#REDIRECT \[\[([^|\]]+)/is && $1 ne $string;
return ( $entry );
}
@@ -187,7 +187,7 @@
my( $title ) = $response->request->uri =~ m{\.org/wiki/(.+)$};
$src = sprintf( WIKIPEDIA_URL, $self->language(), $title );
$response = $self->get( $src );
- return WWW::Wikipedia::Entry->new( $response->content(), $src );
+ return WWW::Wikipedia::Entry->new( $response->decoded_content(), $src );
}
$self->error( "uhoh, WWW::Wikipedia unable to contact " . $src );
More information about the Pkg-perl-cvs-commits
mailing list