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