| 1 | package App::lcpan::Cmd::dist_rdeps; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Log::ger; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use App::lcpan (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use App::lcpan::Cmd::dist_mods; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use Hash::Subset qw(hash_subset hash_subset_without); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||
| 13 | 1 | our $DATE = '2023-09-26'; # DATE | |||||||||
| 14 | 1 | our $DIST = 'App-lcpan'; # DIST | |||||||||
| 15 | 1 | our $VERSION = '1.074'; # VERSION | |||||||||
| 16 | |||||||||||
| 17 | 1 | our %SPEC; | |||||||||
| 18 | |||||||||||
| 19 | 1 | $SPEC{'handle_cmd'} = { | |||||||||
| 20 | v => 1.1, | ||||||||||
| 21 | summary => 'List which distributions depend on specified distribution', | ||||||||||
| 22 | description => <<'_', | ||||||||||
| 23 | |||||||||||
| 24 | This subcommand lists all modules of your specified distribution, then run | ||||||||||
| 25 | 'deps' on all of those modules. So basically, this subcommand shows which | ||||||||||
| 26 | distributions depend on your specified distribution. | ||||||||||
| 27 | |||||||||||
| 28 | _ | ||||||||||
| 29 | args => { | ||||||||||
| 30 | %App::lcpan::common_args, | ||||||||||
| 31 | %App::lcpan::dist_args, | ||||||||||
| 32 | %App::lcpan::rdeps_rel_args, | ||||||||||
| 33 | %App::lcpan::rdeps_phase_args, | ||||||||||
| 34 | %App::lcpan::rdeps_level_args, | ||||||||||
| 35 | }, | ||||||||||
| 36 | }; | ||||||||||
| 37 | 0 | ▶ | sub handle_cmd { | ||||||||
|
Subroutine
handle_cmd: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 38 | 0 | my %args = @_; | |||||||||
| 39 | |||||||||||
| 40 | 0 | my $state = App::lcpan::_init(\%args, 'ro'); | |||||||||
| 41 | 0 | my $dbh = $state->{dbh}; | |||||||||
| 42 | |||||||||||
| 43 | my $res = App::lcpan::Cmd::dist_mods::handle_cmd( | ||||||||||
| 44 | hash_subset(\%args, \%App::lcpan::common_args), | ||||||||||
| 45 | dist => $args{dist}, | ||||||||||
| 46 | 0 | ); | |||||||||
| 47 | 0 | ▶ | return [500, "Can't list modules of dist '$args{dist}': $res->[0] - $res->[1]"] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | unless $res->[0] == 200; | ||||||||||
| 49 | |||||||||||
| 50 | 0 | App::lcpan::rdeps( | |||||||||
| 51 | hash_subset(\%args, \%App::lcpan::common_args), | ||||||||||
| 52 | modules => $res->[2], | ||||||||||
| 53 | hash_subset(\%args, \%App::lcpan::rdeps_rel_args), | ||||||||||
| 54 | hash_subset(\%args, \%App::lcpan::rdeps_phase_args), | ||||||||||
| 55 | hash_subset(\%args, \%App::lcpan::rdeps_level_args), | ||||||||||
| 56 | ); | ||||||||||
| 57 | } | ||||||||||
| 58 | |||||||||||
| 59 | 1 | 1; | |||||||||
| 60 | # ABSTRACT: List which distributions depend on specified distribution | ||||||||||
| 61 | |||||||||||
| 62 | __END__ | ||||||||||