blib/lib/OrePAN2/CLI/Indexer.pm

filter: Statementstmt 97.1% 34 / 35 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 2 totaltotal 90.0% 45 / 50 CC 3 SCAR 4.5
CC
3
Cov
92%
run
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
« blib/lib/OrePAN2/Repository.pm ↑ Summary blib/lib/OrePAN2/Logger.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 qw( pod2usage );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 3 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
13 3 my $class = shift;
14 3 bless {}, $class;
15 }
16  
17 3 ▶sub run {
Subroutine run: called CC=3 SCAR=11.2
Pod undocumented
18 3 my ( $self, @args ) = @_;
19  
20 3 my $version;
21 my $text;
22 3 my $metacpan;
23 3 my $simple = 0;
24  
25 3 my $p = Getopt::Long::Parser->new(
26 config => [qw(posix_default no_ignore_case auto_help)] );
27 3 $p->getoptionsfromarray(
28 \@args => (
29 'metacpan!' => \$metacpan,
30 'version!' => \$version,
31 'text!' => \$text,
32 'simple!' => \$simple,
33 )
34 );
35 3 ▶ if ($version) {
Branch: 1 branch
BranchTrueFalseTotal
if ($version) 0 3 3
36 0 print "orepan2: $OrePAN2::VERSION\n";
37 }
38 3 ▶ my $directory = shift @args or pod2usage(
Branch: 1 branch
BranchTrueFalseTotal
my $directory = shift @args or pod2usage("-input", $0) 3 0 3
39 -input => $0,
40 );
41 3 my $orepan = OrePAN2::Indexer->new(
42 directory => $directory,
43 metacpan => $metacpan,
44 simple => $simple,
45 );
46 3 $orepan->make_index(
47 no_compress => $text,
48 );
49 }
50  
51 1 1;
« blib/lib/OrePAN2/Repository.pm ↑ Summary blib/lib/OrePAN2/Logger.pm »