| 1 | package Dist::Zilla::App::Command::authordeps 6.040; | ||||||||||||
| 2 | # ABSTRACT: List your distribution's author dependencies | ||||||||||||
| 3 | |||||||||||||
| 4 | 4 | ▶ | use Dist::Zilla::Pragmas; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 4 | ▶ | use Dist::Zilla::App -command; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | #pod =head1 SYNOPSIS | ||||||||||||
| 9 | #pod | ||||||||||||
| 10 | #pod $ dzil authordeps | ||||||||||||
| 11 | #pod | ||||||||||||
| 12 | #pod This will scan the F<dist.ini> file and print a list of plugin modules that | ||||||||||||
| 13 | #pod probably need to be installed for the dist to be buildable. This is a very | ||||||||||||
| 14 | #pod naive scan, but tends to be pretty accurate. Modules can be added to its | ||||||||||||
| 15 | #pod results by using special comments in the form: | ||||||||||||
| 16 | #pod | ||||||||||||
| 17 | #pod ; authordep Some::Package | ||||||||||||
| 18 | #pod | ||||||||||||
| 19 | #pod In order to add authordeps to all distributions that use a certain plugin bundle | ||||||||||||
| 20 | #pod (or plugin), just list them as prereqs of that bundle (e.g.: using | ||||||||||||
| 21 | #pod L<Dist::Zilla::Plugin::Prereqs> ). | ||||||||||||
| 22 | #pod | ||||||||||||
| 23 | #pod =cut | ||||||||||||
| 24 | |||||||||||||
| 25 | 0 | ▶ | sub abstract { "list your distribution's author dependencies" } | ||||||||||
|
Subroutine
abstract: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 26 | |||||||||||||
| 27 | 0 | ▶ | sub opt_spec { | ||||||||||
|
Subroutine
opt_spec: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 28 | return ( | ||||||||||||
| 29 | 0 | [ 'root=s' => 'the root of the dist; defaults to .' ], | |||||||||||
| 30 | [ 'missing' => 'list only the missing dependencies' ], | ||||||||||||
| 31 | [ 'versions' => 'include required version numbers in listing' ], | ||||||||||||
| 32 | [ 'cpanm-versions' => 'format versions for consumption by cpanm' ], | ||||||||||||
| 33 | ); | ||||||||||||
| 34 | } | ||||||||||||
| 35 | |||||||||||||
| 36 | 0 | ▶ | sub execute { | ||||||||||
|
Subroutine
execute: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||
| 37 | 0 | my ($self, $opt, $arg) = @_; | |||||||||||
| 38 | |||||||||||||
| 39 | 0 | require Dist::Zilla::Path; | |||||||||||
| 40 | 0 | require Dist::Zilla::Util::AuthorDeps; | |||||||||||
| 41 | |||||||||||||
| 42 | 0 | ▶ | my $deps = Dist::Zilla::Util::AuthorDeps::_format_author_deps( | ||||||||||
|
Condition0%0/2
$opt->root // "."
MC/DC0%0/1
$opt->root // "."
$opt->root
Truth table0%0/2
A
A= $opt->root
| |||||||||||||
| 43 | Dist::Zilla::Util::AuthorDeps::extract_author_deps( | ||||||||||||
| 44 | Dist::Zilla::Path::path($opt->root // '.'), | ||||||||||||
| 45 | $opt->missing, | ||||||||||||
| 46 | ), | ||||||||||||
| 47 | $opt->versions, | ||||||||||||
| 48 | $opt->cpanm_versions | ||||||||||||
| 49 | ); | ||||||||||||
| 50 | |||||||||||||
| 51 | 0 | ▶ | $self->log($deps) if $deps; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 52 | |||||||||||||
| 53 | 0 | return; | |||||||||||
| 54 | } | ||||||||||||
| 55 | |||||||||||||
| 56 | 4 | 1; | |||||||||||
| 57 | |||||||||||||
| 58 | __END__ | ||||||||||||