File Coverage

blib/lib/App/DuckPAN/Cmd/Install.pm
Criterion Covered Total %
statement 6 11 54.5
branch 0 4 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 19 42.1


line stmt bran cond sub pod time code
1             package App::DuckPAN::Cmd::Install;
2             our $AUTHORITY = 'cpan:DDG';
3             # ABSTRACT: Install the distribution in current directory
4             $App::DuckPAN::Cmd::Install::VERSION = '1018';
5 1     1   1581 use Moo;
  1         2  
  1         5  
6             with qw( App::DuckPAN::Cmd );
7              
8 1     1   271 use MooX::Options protect_argv => 0;
  1         2  
  1         7  
9              
10             sub run {
11 0     0 0   my ( $self, @args ) = @_;
12              
13 0 0         if (-f 'dist.ini') {
14 0           $self->app->emit_info("Found a dist.ini, suggesting a Dist::Zilla distribution");
15              
16 0 0         $self->app->perl->cpanminus_install_error
17             if (system("dzil install --install-command 'cpanm .' @args"));
18 0           $self->app->emit_info("Everything fine!");
19             }
20              
21             }
22              
23             1;
24              
25             __END__
26              
27             =pod
28              
29             =head1 NAME
30              
31             App::DuckPAN::Cmd::Install - Install the distribution in current directory
32              
33             =head1 VERSION
34              
35             version 1018
36              
37             =head1 AUTHOR
38              
39             DuckDuckGo <open@duckduckgo.com>, Zach Thompson <zach@duckduckgo.com>, Zaahir Moolla <moollaza@duckduckgo.com>, Torsten Raudssus <torsten@raudss.us> L<https://raudss.us/>
40              
41             =head1 COPYRIGHT AND LICENSE
42              
43             This software is Copyright (c) 2013 by DuckDuckGo, Inc. L<https://duckduckgo.com/>.
44              
45             This is free software, licensed under:
46              
47             The Apache License, Version 2.0, January 2004
48              
49             =cut