| 1 | #!/usr/bin/env perl | ||||||||||
| 2 | |||||||||||
| 3 | package MediaWiki::DumpFile::FastPages; | ||||||||||
| 4 | |||||||||||
| 5 | 1 | our $VERSION = '0.2.0'; | |||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use base qw(MediaWiki::DumpFile::Pages); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use Data::Dumper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 2 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 13 | 2 | my ($class, $input) = @_; | |||||||||
| 14 | 1 | ▶ | use Carp qw(croak); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 2 | my $self; | |||||||||
| 16 | |||||||||||
| 17 | 2 | ▶ | if (! defined($input)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 0 | croak "you must provide either a filename or an already open file handle"; | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 2 | $self = $class->SUPER::new(input => $input, fast_mode => 1); | |||||||||
| 22 | 2 | bless($self, $class); | |||||||||
| 23 | |||||||||||
| 24 | 2 | return $self; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 8 | ▶ | sub next { | ||||||||
|
Subroutine
next: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 28 | 8 | my ($self) = @_; | |||||||||
| 29 | |||||||||||
| 30 | 8 | return $self->_fast_next; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | 1; | |||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||