Skip Menu |

This queue is for tickets about the Parse-MediaWikiDump CPAN distribution.

Report information
The Basics
Id: 50241
Status: resolved
Priority: 0/
Queue: Parse-MediaWikiDump

People
Owner: Nobody in particular
Requestors: DVWRIGHT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.1
  • 0.2
  • 0.21
  • 0.22
  • 0.24
  • 0.30
  • 0.31
  • 0.32
  • 0.33
  • 0.40
  • 0.51
  • 0.51.1
  • 0.52
  • 0.53
  • 0.54
  • 0.55
  • 0.90
  • 0.91
  • 0.92
  • 0.93
  • 0.94
Fixed in: (no value)



Subject: Does not handle object (blessed) filehandle streams
Parse::MediaWikiDump::Revisions has support to open regular filehandles but does not handle object (blessed) filehandle streams. bz2 is a very common filetype for MediaWiki Dumps, the defacto (?) way to handle these in perl is with IO::Uncompress::Bunzip2. Currently, passing a filehandle from IO::Uncompress::Bunzip2 to Parse::MediaWikiDump results in: could not open IO::Uncompress::Bunzip2=GLOB(0xa3695e0): No such file or directory at lib/Parse/MediaWikiDump/Revisions.pm line 129. Desired result: Parse::MediaWikiDump transparently handles gz and bz2 files as it does 'regular' files and filehandles. The fix is trivial, add use Scalar::Util qw(reftype); and change line 124: if (ref($source) eq 'GLOB') { to line 124: if (reftype($source) && reftype($source) eq 'GLOB') { lib/Parse/MediaWikiDump/Revisions.pm I am including a diff of Revisions.pm and a diff of pages.t (I added a test) as well as a diff for Build.PL (as well as 2 compressed test files)
Subject: bugfix.tar.gz
Download bugfix.tar.gz
application/x-gzip 2.8k

Message body not shown because it is not plain text.

Thanks for the great feature request! This is perfect for the upcoming 1.0. I'll work to get this integrated and released soon. I also really appreciate the patch and tests. Take care, Tyler Riddle On Tue Oct 06 03:39:58 2009, DVWRIGHT wrote: Show quoted text
> Parse::MediaWikiDump::Revisions has support to open regular filehandles > but does not handle object (blessed) filehandle streams. > > bz2 is a very common filetype for MediaWiki Dumps, the defacto (?) > way to handle these in perl is with IO::Uncompress::Bunzip2. > > Currently, passing a filehandle from IO::Uncompress::Bunzip2 to > Parse::MediaWikiDump > results in: > could not open IO::Uncompress::Bunzip2=GLOB(0xa3695e0): No such file or > directory at lib/Parse/MediaWikiDump/Revisions.pm line 129. > > > Desired result: > Parse::MediaWikiDump transparently handles gz and bz2 files as it does > 'regular' > files and filehandles. > > The fix is trivial, add > use Scalar::Util qw(reftype); > and change > line 124: if (ref($source) eq 'GLOB') { > to > line 124: if (reftype($source) && reftype($source) eq 'GLOB') { > lib/Parse/MediaWikiDump/Revisions.pm > > I am including a diff of Revisions.pm and a diff of pages.t (I added a > test) as well as a diff for Build.PL (as well as 2 compressed test files) >
I added this feature and released version 0.95. Attached to this ticket is the new distribution so you can use it before it hits the CPAN mirrors. Thanks for the feature request and the patches, Tyler Riddle
I added this feature and released version 0.95. Attached to this ticket is the new distribution so you can use it before it hits the CPAN mirrors. Thanks for the feature request and the patches, Tyler Riddle
Download Parse-MediaWikiDump-0.95.tar.gz
application/x-gzip 16.2k

Message body not shown because it is not plain text.