Cmd/sah_compilers.pm

filter: Statementstmt 56.0% 14 / 25 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 50.0% 18 / 36 CC 6 SCAR 33.4
CC
6
Cov
45%
handle_cmd
42.0
BEGIN
1.0
BEGIN
1.0
CRAP 28.3
↑ Summary Cmd/sah_types.pm »
1 package App::lcpan::Cmd::sah_compilers;
2  
3 1 our $DATE = '2017-01-20'; # DATE
4 1 our $VERSION = '0.01'; # VERSION
5  
6 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 require App::lcpan;
11  
12 1 our %SPEC;
13  
14 $SPEC{handle_cmd} = {
15 1 v => 1.1,
16 summary => 'List Data::Sah compilers available on CPAN',
17 args => {
18 %App::lcpan::common_args,
19 %App::lcpan::query_multi_args,
20 %App::lcpan::fauthor_args,
21 %App::lcpan::fdist_args,
22 %App::lcpan::flatest_args,
23 %App::lcpan::sort_modules_args,
24 },
25 };
26 0 ▶sub handle_cmd {
Subroutine handle_cmd: not called CC=6 SCAR=37.4
Pod documented
27 0 my %args = @_;
28  
29 0 my $res = App::lcpan::modules(%args, namespaces=>['Data::Sah::Compiler']);
30  
31 # remove Acme::CPANLists itself
32 0 my $filtered = [];
33 REC:
34 0 for my $rec (@{$res->[2]}) {
35 0 ▶ for ($args{detail} ? $rec->{module} : $rec) {
Branch: 1 branch
BranchTrueFalseTotal
$args{'detail'} ? : 0 0 0
36 0 ▶ s/\AData::Sah::Compiler::// or next REC;
Branch: 1 branch
BranchTrueFalseTotal
s/\AData::Sah::Compiler::// or next REC 0 0 0
37 0 ▶ /\A([^:]::)*[a-z][^:]*\z/ or next REC;
Branch: 1 branch
BranchTrueFalseTotal
/\A([^:]::)*[a-z][^:]*\z/ or next REC 0 0 0
38 }
39 0 push @$filtered, $rec;
40 }
41 0 $res->[2] = $filtered;
42 0 $res;
43 }
44  
45 1 1;
46 # ABSTRACT: List Data::Sah compilers available on CPAN
47  
48 __END__
↑ Summary Cmd/sah_types.pm »