blib/lib/OrePAN2/CLI/Indexer.pm

filter: Statementstmt 62.8% 22 / 35 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 2 totaltotal 58.0% 29 / 50 CC 3 SCAR 14.1
CC
3
Cov
56%
run
12.0
new
2.0
BEGIN
1.0
CRAP 4.1
« blib/lib/OrePAN2/Index.pm ↑ Summary blib/lib/OrePAN2/Repository.pm »
1 package OrePAN2::CLI::Indexer;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Getopt::Long ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use OrePAN2;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use OrePAN2::Indexer;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Pod::Usage;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 sub new {
13 0 ▶ my $class = shift;
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
14 0 bless {}, $class;
15 }
16  
17 sub run {
18 0 ▶ my ( $self, @args ) = @_;
Subroutine run: not called CC=3 SCAR=24.8
Pod undocumented
19  
20 0 my $version;
21 my $text;
22 0 my $metacpan;
23 0 my $simple = 0;
24  
25 0 my $p = Getopt::Long::Parser->new(
26 config => [qw(posix_default no_ignore_case auto_help)] );
27 0 $p->getoptionsfromarray(
28 \@args => (
29 'metacpan!' => \$metacpan,
30 'version!' => \$version,
31 'text!' => \$text,
32 'simple!' => \$simple,
33 )
34 );
35 0 ▶ if ($version) {
Branch: 1 branch
BranchTrueFalseTotal
if ($version) 0 0 0
36 0 print "orepan2: $OrePAN2::VERSION\n";
37 }
38 0 ▶ my $directory = shift @args or pod2usage(
Branch: 1 branch
BranchTrueFalseTotal
my $directory = shift @args or pod2usage("-input", $0) 0 0 0
39 -input => $0,
40 );
41 0 my $orepan = OrePAN2::Indexer->new(
42 directory => $directory,
43 metacpan => $metacpan,
44 simple => $simple,
45 );
46 0 $orepan->make_index(
47 no_compress => $text,
48 );
49 }
50  
51 1 1;
« blib/lib/OrePAN2/Index.pm ↑ Summary blib/lib/OrePAN2/Repository.pm »