line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OrePAN2::CLI::Indexer; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
25362
|
use strict; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
671
|
use Getopt::Long (); |
|
1
|
|
|
|
|
8968
|
|
|
1
|
|
|
|
|
30
|
|
8
|
1
|
|
|
1
|
|
407
|
use OrePAN2; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
9
|
1
|
|
|
1
|
|
363
|
use OrePAN2::Indexer; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
32
|
|
10
|
1
|
|
|
1
|
|
500
|
use Pod::Usage; |
|
1
|
|
|
|
|
31742
|
|
|
1
|
|
|
|
|
258
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
3
|
|
|
3
|
0
|
7192
|
my $class = shift; |
14
|
3
|
|
|
|
|
13
|
bless {}, $class; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub run { |
18
|
3
|
|
|
3
|
0
|
10
|
my ( $self, @args ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
|
|
7
|
my $version; |
21
|
|
|
|
|
|
|
my $text; |
22
|
3
|
|
|
|
|
0
|
my $metacpan; |
23
|
3
|
|
|
|
|
6
|
my $simple = 0; |
24
|
|
|
|
|
|
|
|
25
|
3
|
|
|
|
|
20
|
my $p = Getopt::Long::Parser->new( |
26
|
|
|
|
|
|
|
config => [qw(posix_default no_ignore_case auto_help)] ); |
27
|
3
|
|
|
|
|
315
|
$p->getoptionsfromarray( |
28
|
|
|
|
|
|
|
\@args => ( |
29
|
|
|
|
|
|
|
'metacpan!' => \$metacpan, |
30
|
|
|
|
|
|
|
'version!' => \$version, |
31
|
|
|
|
|
|
|
'text!' => \$text, |
32
|
|
|
|
|
|
|
'simple!' => \$simple, |
33
|
|
|
|
|
|
|
) |
34
|
|
|
|
|
|
|
); |
35
|
3
|
50
|
|
|
|
1174
|
if ($version) { |
36
|
0
|
|
|
|
|
0
|
print "orepan2: $OrePAN2::VERSION\n"; |
37
|
|
|
|
|
|
|
} |
38
|
3
|
50
|
|
|
|
10
|
my $directory = shift @args or pod2usage( |
39
|
|
|
|
|
|
|
-input => $0, |
40
|
|
|
|
|
|
|
); |
41
|
3
|
|
|
|
|
31
|
my $orepan = OrePAN2::Indexer->new( |
42
|
|
|
|
|
|
|
directory => $directory, |
43
|
|
|
|
|
|
|
metacpan => $metacpan, |
44
|
|
|
|
|
|
|
simple => $simple, |
45
|
|
|
|
|
|
|
); |
46
|
3
|
|
|
|
|
10
|
$orepan->make_index( |
47
|
|
|
|
|
|
|
no_compress => $text, |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |