MediaWiki::DumpFile::Compat(3pm) | User Contributed Perl Documentation | MediaWiki::DumpFile::Compat(3pm) |
MediaWiki::DumpFile::Compat - Compatibility with Parse::MediaWikiDump
use MediaWiki::DumpFile::Compat; $pmwd = Parse::MediaWikiDump->new; $pages = $pmwd->pages('pages-articles.xml'); $revisions = $pmwd->revisions('pages-articles.xml'); $links = $pmwd->links('links.sql');
This software suite provides the tools needed to process the contents of the XML page dump files and the SQL based links dump file from a Mediawiki instance. This is a compatibility layer between MediaWiki::Dumpfile and Parse::MediaWikiDump; instead of "use Parse::MediaWikiDump;" you "use MediaWiki::DumpFile::Compat;". The benefit of using the new compatibility module is an increased processing speed - see the MediaWiki::DumpFile::Benchmarks documentation for benchmark results.
The original Parse::MediaWikiDump documentation is also available in this package; it has been updated to include new features introduced by MediaWiki::DumpFile. You can find the documentation in the following locations:
This module is a factory class that allows you to create instances of the individual parser objects.
All parser creation invocations require a location of source data to parse; this argument can be either a filename or a reference to an already open filehandle. This entire software suite will die() upon errors in the file or if internal inconsistencies have been detected. If this concerns you then you can wrap the portion of your code that uses these calls with eval().
Any deviation of the behavior of MediaWiki::DumpFile::Compat from Parse::MediaWikiDump that is not listed below is a bug. Please report it so that this package can act as a near perfect standin for the original. Compatibility is verified by using the existing Parse::MediaWikiDump test suite with the following adjustments:
2016-06-27 | perl v5.22.2 |