.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MediaWiki::DumpFile::Compat::page 3pm" .TH MediaWiki::DumpFile::Compat::page 3pm "2022-06-15" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Parse::MediaWikiDump::page \- Object representing a specific revision of a MediaWiki page .SH "ABOUT" .IX Header "ABOUT" This object is returned from the \*(L"next\*(R" method of Parse::MediaWikiDump::Pages and Parse::MediaWikiDump::Revisions. You most likely will not be creating instances of this particular object yourself instead you use this object to access the information about a page in a MediaWiki instance. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use MediaWiki::DumpFile::Compat; \& \& $pages = Parse::MediaWikiDump::Pages\->new(\*(Aqpages\-articles.xml\*(Aq); \& \& #get all the records from the dump files, one record at a time \& while(defined($page = $pages\->next)) { \& print "title \*(Aq", $page\->title, "\*(Aq id ", $page\->id, "\en"; \& } .Ve .SH "METHODS" .IX Header "METHODS" .ie n .IP "$page\->redirect" 4 .el .IP "\f(CW$page\fR\->redirect" 4 .IX Item "$page->redirect" Returns an empty string (such as '') for the main namespace or a string containing the name of the namespace. .ie n .IP "$page\->categories" 4 .el .IP "\f(CW$page\fR\->categories" 4 .IX Item "$page->categories" Returns a reference to an array that contains a list of categories or undef if there are no categories. This method does not understand templates and may not return all the categories the article actually belongs in. .ie n .IP "$page\->title" 4 .el .IP "\f(CW$page\fR\->title" 4 .IX Item "$page->title" Returns a string of the full article title including the namespace if present .ie n .IP "$page\->namespace" 4 .el .IP "\f(CW$page\fR\->namespace" 4 .IX Item "$page->namespace" Returns a string of the namespace of the article or an empty string if the article is in the default namespace .ie n .IP "$page\->id" 4 .el .IP "\f(CW$page\fR\->id" 4 .IX Item "$page->id" Returns a number that is the id for the page in the MediaWiki instance .ie n .IP "$page\->revision_id" 4 .el .IP "\f(CW$page\fR\->revision_id" 4 .IX Item "$page->revision_id" Returns a number that is the revision id for the page in the MediaWiki instance .ie n .IP "$page\->timestamp" 4 .el .IP "\f(CW$page\fR\->timestamp" 4 .IX Item "$page->timestamp" Returns a string in the following format: 2005\-07\-09T18:41:10Z .ie n .IP "$page\->username" 4 .el .IP "\f(CW$page\fR\->username" 4 .IX Item "$page->username" Returns a string of the username responsible for this specific revision of the article or undef if the editor was anonymous .ie n .IP "$page\->userid" 4 .el .IP "\f(CW$page\fR\->userid" 4 .IX Item "$page->userid" Returns a number that is the id for the user returned by \f(CW$page\fR\->username or undef if the editor was anonymous .ie n .IP "$page\->userip" 4 .el .IP "\f(CW$page\fR\->userip" 4 .IX Item "$page->userip" Returns a string of the \s-1IP\s0 of the editor if the edit was anonymous or undef otherwise .ie n .IP "$page\->minor" 4 .el .IP "\f(CW$page\fR\->minor" 4 .IX Item "$page->minor" Returns 1 if this article was flaged as a minor edit otherwise returns 0 .ie n .IP "$page\->text" 4 .el .IP "\f(CW$page\fR\->text" 4 .IX Item "$page->text" Returns a reference to a string that contains the article title text