| 1 | package App::lcpan::Cmd::cpanauthors_mods; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||
| 4 | 1 | our $DATE = '2019-12-26'; # DATE | |||||||||
| 5 | 1 | our $DIST = 'App-lcpan-CmdBundle-cpanauthors'; # DIST | |||||||||
| 6 | 1 | our $VERSION = '0.002'; # VERSION | |||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | require App::lcpan; | |||||||||
| 13 | |||||||||||
| 14 | 1 | our %SPEC; | |||||||||
| 15 | |||||||||||
| 16 | $SPEC{handle_cmd} = { | ||||||||||
| 17 | 1 | v => 1.1, | |||||||||
| 18 | summary => 'List Acme::CPANAuthors modules available on CPAN', | ||||||||||
| 19 | args => { | ||||||||||
| 20 | %App::lcpan::common_args, | ||||||||||
| 21 | %App::lcpan::query_multi_args, | ||||||||||
| 22 | %App::lcpan::fauthor_args, | ||||||||||
| 23 | %App::lcpan::fdist_args, | ||||||||||
| 24 | %App::lcpan::flatest_args, | ||||||||||
| 25 | %App::lcpan::sort_modules_args, | ||||||||||
| 26 | }, | ||||||||||
| 27 | }; | ||||||||||
| 28 | 0 | ▶ | sub handle_cmd { | ||||||||
|
Subroutine
handle_cmd: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||
| 29 | 0 | my %args = @_; | |||||||||
| 30 | |||||||||||
| 31 | 0 | my $res = App::lcpan::modules(%args, namespaces=>['Acme::CPANAuthors']); | |||||||||
| 32 | |||||||||||
| 33 | # remove Acme::CPANAuthors itself | ||||||||||
| 34 | 0 | ▶ | if ($args{detail}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | $res->[2] = [grep {$_->{module} ne 'Acme::CPANAuthors'} @{$res->[2]}]; | |||||||||
| 36 | } else { | ||||||||||
| 37 | 0 | $res->[2] = [grep {$_ ne 'Acme::CPANAuthors'} @{$res->[2]}]; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 0 | for (@{$res->[2]}) { | |||||||||
| 41 | 0 | ▶ | if ($args{detail}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | 0 | ($_->{name} = $_->{module}) =~ s/^Acme::CPANAuthors:://; | |||||||||
| 43 | } else { | ||||||||||
| 44 | 0 | s/^Acme::CPANAuthors:://; | |||||||||
| 45 | } | ||||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 0 | $res; | |||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | 1 | 1; | |||||||||
| 52 | # ABSTRACT: List Acme::CPANAuthors modules available on CPAN | ||||||||||
| 53 | |||||||||||
| 54 | __END__ | ||||||||||