blib/lib/Dist/Zilla/App/Command/install.pm

filter: Statementstmt 63.6% 7 / 11 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 100% 3 / 3 totaltotal 52.1% 12 / 23 CC 3 SCAR 17.9
CC
3
Cov
47%
execute
12.0
abstract
2.0
opt_spec
2.0
CRAP 6.0
« blib/lib/Dist/Zilla/App/Command/authordeps.pm ↑ Summary blib/lib/Dist/Zilla/Role/FileFinderUser.pm »
1 package Dist::Zilla::App::Command::install 6.040;
2 # ABSTRACT: install your dist
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 Installs your distribution using a specified command.
11 #pod
12 #pod dzil install [--install-command="cmd"]
13 #pod
14 #pod =cut
15 0 ▶sub abstract { 'install your dist' }
Subroutine abstract: not called CC=1 SCAR=6.9
Pod documented
16  
17 #pod =head1 EXAMPLE
18 #pod
19 #pod $ dzil install
20 #pod $ dzil install --install-command="cpan ."
21 #pod
22 #pod =cut
23  
24 0 ▶sub opt_spec {
Subroutine opt_spec: not called CC=1 SCAR=6.9
Pod documented
25 0 [ 'install-command=s', 'command to run to install (e.g. "cpan .")' ],
26 [ 'keep-build-dir|keep' => 'keep the build directory even after a success' ],
27 }
28  
29 #pod =head1 OPTIONS
30 #pod
31 #pod =head2 --install-command
32 #pod
33 #pod This defines what command to run after building the dist in the dist dir.
34 #pod
35 #pod Any value that works with L<C<system>|perlfunc/system> is accepted.
36 #pod
37 #pod If not specified, calls (roughly):
38 #pod
39 #pod cpanm .
40 #pod
41 #pod For more information, look at the L<install|Dist::Zilla::Dist::Builder/install> method in
42 #pod Dist::Zilla.
43 #pod
44 #pod =cut
45  
46 0 ▶sub execute {
Subroutine execute: not called CC=3 SCAR=24.8
Pod documented
47 0 my ($self, $opt, $arg) = @_;
48  
49 0 ▶ $self->zilla->install({
Branch: 2 branches
BranchTrueFalseTotal
$opt->install_command ? : 0 0 0
$opt->keep_build_dir ? : 0 0 0
50 $opt->install_command
51 ? (install_command => [ $opt->install_command ])
52 : (),
53 $opt->keep_build_dir
54 ? (keep_build_dir => 1)
55 : (),
56 });
57 }
58  
59 4 1;
60  
61 __END__
« blib/lib/Dist/Zilla/App/Command/authordeps.pm ↑ Summary blib/lib/Dist/Zilla/Role/FileFinderUser.pm »