r46227 - in /trunk/libparse-mediawikidump-perl: Changes META.yml debian/changelog debian/control debian/copyright lib/Parse/MediaWikiDump.pm lib/Parse/MediaWikiDump/Pages.pm lib/Parse/MediaWikiDump/Revisions.pm t/pages.t t/revisions.t
angelabad-guest at users.alioth.debian.org
angelabad-guest at users.alioth.debian.org
Thu Oct 22 22:57:58 UTC 2009
Author: angelabad-guest
Date: Thu Oct 22 22:57:52 2009
New Revision: 46227
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46227
Log:
New upstream release 0.96
Modified:
trunk/libparse-mediawikidump-perl/Changes
trunk/libparse-mediawikidump-perl/META.yml
trunk/libparse-mediawikidump-perl/debian/changelog
trunk/libparse-mediawikidump-perl/debian/control
trunk/libparse-mediawikidump-perl/debian/copyright
trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump.pm
trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Pages.pm
trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Revisions.pm
trunk/libparse-mediawikidump-perl/t/pages.t
trunk/libparse-mediawikidump-perl/t/revisions.t
Modified: trunk/libparse-mediawikidump-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/Changes?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/Changes (original)
+++ trunk/libparse-mediawikidump-perl/Changes Thu Oct 22 22:57:52 2009
@@ -1,9 +1,18 @@
Revision history for Parse-MediaWikiDump
-0.95
+0.96 Oct 22, 2009
+ * Allowed parsing of 0.4 version XML dump files but not
+ support for new features
+ * Added in a method to retrieve the version number of
+ the XML dump file
+
+0.95 Oct 14, 2009
* Found and removed a circular reference but it did not
stop the memory leak
- * Fixed bug 50092
+ * Fixed bug 50092 - some times $page->text would return
+ a reference to an undefined value
+ * Implemented support for compressed file GLOB objects per
+ bug 50241
0.94 Sep 28, 2009
* Fix bug 49979 - "redirect in newer Wikipedia dumps" by allowing
@@ -11,7 +20,8 @@
0.93 Sep 15, 2009
* Made ::Pages a subclass of ::Revisions
- * Discovered a bug regression: ::Pages and ::Revisions leak memory/are not properly garbage collected
+ * Discovered a bug regression: ::Pages and ::Revisions leak
+ memory/are not properly garbage collected
0.92 Apr 15, 2009
* Completed documentation for all modules
Modified: trunk/libparse-mediawikidump-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/META.yml?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/META.yml (original)
+++ trunk/libparse-mediawikidump-perl/META.yml Thu Oct 22 22:57:52 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Parse-MediaWikiDump
-version: 0.95
+version: 0.96
abstract: Tools to process MediaWiki dump files
author:
- Tyler Riddle <triddle at gmail.com>
Modified: trunk/libparse-mediawikidump-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/debian/changelog?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/debian/changelog (original)
+++ trunk/libparse-mediawikidump-perl/debian/changelog Thu Oct 22 22:57:52 2009
@@ -1,8 +1,9 @@
-libparse-mediawikidump-perl (0.95-2) UNRELEASED; urgency=low
+libparse-mediawikidump-perl (0.96-1) unstable; urgency=low
* Update my email address
+ * New upstream release
- -- Angel Abad <angelabad at gmail.com> Sun, 18 Oct 2009 02:18:39 +0200
+ -- Angel Abad <angelabad at gmail.com> Fri, 23 Oct 2009 00:50:04 +0200
libparse-mediawikidump-perl (0.95-1) unstable; urgency=low
Modified: trunk/libparse-mediawikidump-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/debian/control?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/debian/control (original)
+++ trunk/libparse-mediawikidump-perl/debian/control Thu Oct 22 22:57:52 2009
@@ -7,8 +7,7 @@
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Xavier Oswald <xoswald at debian.org>,
gregor herrmann <gregoa at debian.org>, Ansgar Burchardt <ansgar at 43-1.org>,
- Jonathan Yu <jawnsy at cpan.org>,
- Angel Abad <angelabad at gmail.com>
+ Jonathan Yu <jawnsy at cpan.org>, Angel Abad <angelabad at gmail.com>
Standards-Version: 3.8.3
Homepage: http://search.cpan.org/dist/Parse-MediaWikiDump/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libparse-mediawikidump-perl
Modified: trunk/libparse-mediawikidump-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/debian/copyright?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/debian/copyright (original)
+++ trunk/libparse-mediawikidump-perl/debian/copyright Thu Oct 22 22:57:52 2009
@@ -10,13 +10,14 @@
License: GPL-1+ | Artistic
Files: debian/*
-Copyright: 2009, Angel Abad (Ikusnet SLL) <angel at grupoikusnet.com>
+Copyright: 2006, 2007, Roland Mas <lolando at debian.org>
+ 2008, 2009, Ansgar Burchardt <ansgar at 43-1.org>
+ 2008, Xavier Oswald <x.oswald at free.fr>
+ 2008, gregor herrmann <gregoa at debian.org>
+ 2009, Angel Abad (Ikusnet SLL) <angel at grupoikusnet.com>
+ 2009, Angel Abad <angelabad at gmail.com>
2009, Jonathan Yu <jawnsy at cpan.org>
2009, Xavier Oswald <xoswald at debian.org>
- 2008-2009, Ansgar Burchardt <ansgar at 43-1.org>
- 2008, Xavier Oswald <x.oswald at free.fr>
- 2008, gregor herrmann <gregoa at debian.org>
- 2006-2007, Roland Mas <lolando at debian.org>
License: GPL-1+ | Artistic
License: Artistic
Modified: trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump.pm?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump.pm (original)
+++ trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump.pm Thu Oct 22 22:57:52 2009
@@ -1,5 +1,5 @@
package Parse::MediaWikiDump;
-our $VERSION = '0.95';
+our $VERSION = '0.96';
use Parse::MediaWikiDump::XML;
use Parse::MediaWikiDump::Revisions;
Modified: trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Pages.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Pages.pm?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Pages.pm (original)
+++ trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Pages.pm Thu Oct 22 22:57:52 2009
@@ -1,6 +1,6 @@
package Parse::MediaWikiDump::Pages;
-our $VERSION = '0.94';
+our $VERSION = '0.96';
use base qw(Parse::MediaWikiDump::Revisions);
@@ -15,7 +15,7 @@
my $store_page = $self->{PAGE_LIST};
my $root = $f->root;
- my $mediawiki = $f->node('mediawiki', Start => \&validate_mediawiki_node);
+ my $mediawiki = $f->node('mediawiki', Start => \&handle_mediawiki_node);
#stuff for siteinfo
my $siteinfo = $f->node('siteinfo', End => sub { %$store_siteinfo = %{ $_[1] } } );
@@ -68,9 +68,8 @@
return $engine;
}
-sub validate_mediawiki_node {
- my ($engine, $a, $element, $attrs) = @_;
- die "Only version 0.3 dump files are supported" unless $attrs->{version} eq '0.3';
+sub handle_mediawiki_node {
+ return Parse::MediaWikiDump::Revisions::handle_mediawiki_node(@_);
}
sub save_namespace_node {
@@ -122,6 +121,10 @@
Returns an instance of the next available Parse::MediaWikiDump::page object or returns undef
if there are no more articles left.
+
+=item $pages->version
+
+Returns a plain text string of the dump file format revision number
=item $pages->sitename
Modified: trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Revisions.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Revisions.pm?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Revisions.pm (original)
+++ trunk/libparse-mediawikidump-perl/lib/Parse/MediaWikiDump/Revisions.pm Thu Oct 22 22:57:52 2009
@@ -1,6 +1,6 @@
package Parse::MediaWikiDump::Revisions;
-our $VERSION = '0.95';
+our $VERSION = '0.96';
use 5.8.0;
@@ -54,6 +54,11 @@
die "should not get here";
}
+sub version {
+ my ($self) = @_;
+ return $self->{SITEINFO}{version};
+}
+
sub sitename {
my ($self) = @_;
return $$self{SITEINFO}{sitename};
@@ -165,7 +170,7 @@
my $store_page = $self->{PAGE_LIST};
my $root = $f->root;
- my $mediawiki = $f->node('mediawiki', Start => \&validate_mediawiki_node);
+ my $mediawiki = $f->node('mediawiki', Start => \&handle_mediawiki_node);
#stuff for siteinfo
my $siteinfo = $f->node('siteinfo', End => sub { %$store_siteinfo = %{ $_[1] } } );
@@ -262,9 +267,15 @@
push(@{ $accum->{namespaces} }, [$key, $text] );
}
-sub validate_mediawiki_node {
+sub handle_mediawiki_node {
my ($engine, $a, $element, $attrs) = @_;
- die "Only version 0.3 dump files are supported" unless $attrs->{version} eq '0.3';
+ my $version = $attrs->{version};
+
+ if ($version ne '0.3' && $version ne '0.4') {
+ die "Only version 0.3 and 0.4 dump files are supported";
+ }
+
+ $a->{version} = $version;
}
sub save_siteinfo {
@@ -313,6 +324,10 @@
Returns an instance of the next available Parse::MediaWikiDump::page object or returns undef
if there are no more articles left.
+
+=item $revisions->version
+
+Returns a plain text string of the dump file format revision number
=item $revisions->sitename
Modified: trunk/libparse-mediawikidump-perl/t/pages.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/t/pages.t?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/t/pages.t (original)
+++ trunk/libparse-mediawikidump-perl/t/pages.t Thu Oct 22 22:57:52 2009
@@ -1,6 +1,6 @@
#!perl -w
-use Test::Simple tests => 94;
+use Test::Simple tests => 96;
use strict;
use Parse::MediaWikiDump;
@@ -41,6 +41,7 @@
ok($pages->namespaces->[0]->[0] == -2);
ok($pages->namespaces_names->[0] eq 'Media');
ok($pages->current_byte != 0);
+ ok($pages->version eq '0.3');
if ($mode eq 'file') {
ok($pages->size == 2874);
Modified: trunk/libparse-mediawikidump-perl/t/revisions.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-mediawikidump-perl/t/revisions.t?rev=46227&op=diff
==============================================================================
--- trunk/libparse-mediawikidump-perl/t/revisions.t (original)
+++ trunk/libparse-mediawikidump-perl/t/revisions.t Thu Oct 22 22:57:52 2009
@@ -1,6 +1,6 @@
#!perl -w
-use Test::Simple tests => 98;
+use Test::Simple tests => 100;
use strict;
use Parse::MediaWikiDump;
use Data::Dumper;
@@ -41,6 +41,7 @@
ok($revisions->namespaces->[0]->[0] == -2);
ok($revisions->namespaces_names->[0] eq 'Media');
ok($revisions->current_byte != 0);
+ ok($revisions->version eq '0.3');
if ($mode eq 'file') {
ok($revisions->size == 3112);
More information about the Pkg-perl-cvs-commits
mailing list