MediaWiki::DumpFile::FastPages - Access the title and text of pages from a dump file


  use MediaWiki::DumpFile::FastPages;
  $pages = MediaWiki::DumpFile::FastPages->new($file);
  $pages = MediaWiki::DumpFile::FastPages->new(\*FH);
  while(($title, $text) = $pages->next) {
    print "Title: $title\n";
    print "Text: $text\n";



This is the constructor for this package. It is called with a single parameter: the location of a MediaWiki pages dump file or a reference to an already open file handle.


Returns a two element list where the first element is the article title and the second element is the article text. Returns an empty list when there are no more pages available.


This object is only capable of handling page titles and text contents; as well only the text of the first revision of an article will be returned. If you need to access the other data associated with a page or you need support for more than one revision per page use MediaWiki::DumpFile::Pages instead.


Tyler Riddle, <triddle at>


Please see MediaWiki::DumpFile for information on how to report bugs in this software.


Copyright 2009 "Tyler Riddle".

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.