File Coverage

blib/lib/App/DuckPAN/Cmd/Installdeps.pm
Criterion Covered Total %
statement 6 12 50.0
branch 0 6 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 22 36.3


line stmt bran cond sub pod time code
1             package App::DuckPAN::Cmd::Installdeps;
2             our $AUTHORITY = 'cpan:DDG';
3             # ABSTRACT: Regular way to install requirements with tests
4             $App::DuckPAN::Cmd::Installdeps::VERSION = '1019';
5 1     1   897 use Moo;
  1         2  
  1         5  
6             with qw( App::DuckPAN::Cmd );
7              
8 1     1   264 use MooX::Options protect_argv => 0;
  1         2  
  1         5  
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 0 0         $self->app->perl->cpanminus_install_error
16             if (system("dzil authordeps --missing 2>/dev/null | grep -ve '^\\W' | cpanm"));
17 0 0         $self->app->perl->cpanminus_install_error
18             if (system("dzil listdeps --missing 2>/dev/null | grep -ve '^\\W' | cpanm"));
19 0           $self->app->emit_info("Everything fine!");
20             }
21              
22             }
23              
24             1;
25              
26             __END__
27              
28             =pod
29              
30             =head1 NAME
31              
32             App::DuckPAN::Cmd::Installdeps - Regular way to install requirements with tests
33              
34             =head1 VERSION
35              
36             version 1019
37              
38             =head1 AUTHOR
39              
40             DuckDuckGo <open@duckduckgo.com>, Zach Thompson <zach@duckduckgo.com>, Zaahir Moolla <moollaza@duckduckgo.com>, Torsten Raudssus <torsten@raudss.us> L<https://raudss.us/>
41              
42             =head1 COPYRIGHT AND LICENSE
43              
44             This software is Copyright (c) 2013 by DuckDuckGo, Inc. L<https://duckduckgo.com/>.
45              
46             This is free software, licensed under:
47              
48             The Apache License, Version 2.0, January 2004
49              
50             =cut