| 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
| |||||||||||
| 36 | 0 | ▶ | s/\AData::Sah::Compiler::// or next REC; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 0 | ▶ | /\A([^:]::)*[a-z][^:]*\z/ or next REC; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||