blib/lib/App/Pinto/Command/look.pm

filter: Statementstmt 51.8% 14 / 27 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 4 / 10 Podpod 66.6% 4 / 6 totaltotal 46.8% 22 / 47 CC 3 SCAR 11.0
CC
3
Cov
45%
validate_args
6.0
execute
6.0
command_names
2.0
CRAP 3.0
« blib/lib/Pinto/Role/PauseConfig.pm ↑ Summary blib/lib/App/Pinto/Command/help.pm »
1 # ABSTRACT: unpack and explore distributions with your shell
2  
3 package App::Pinto::Command::look;
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Pinto::Util qw(is_remote_repo);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 #------------------------------------------------------------------------------
11  
12 1 ▶use base 'App::Pinto::Command';
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 #------------------------------------------------------------------------------
15  
16 1 our $VERSION = '0.14'; # VERSION
17  
18 #------------------------------------------------------------------------------
19  
20 0 ▶sub command_names { return qw(look) }
Subroutine command_names: not called CC=1 SCAR=6.9
Pod documented
21  
22 #------------------------------------------------------------------------------
23  
24 0 ▶sub opt_spec {
Subroutine opt_spec: not called CC=1 SCAR=6.9
Pod documented
25 0 my ( $self, $app ) = @_;
26  
27 return (
28 0 [ 'stack|s=s' => 'Resolve targets against this stack' ],
29 );
30 }
31  
32 #------------------------------------------------------------------------------
33  
34 0 ▶sub validate_args {
Subroutine validate_args: not called CC=2 SCAR=17.9
Pod documented
35 0 my ( $self, $opts, $args ) = @_;
36  
37 $self->usage_error('Requires at least one target')
38 0 ▶ unless @{$args};
Branch: 1 branch
BranchTrueFalseTotal
unless @{$args;} 0 0 0
39  
40 0 return 1;
41 }
42  
43 #------------------------------------------------------------------------------
44  
45 0 ▶sub args_attribute { return 'targets' }
Subroutine args_attribute: not called CC=1 SCAR=6.9
Pod undocumented
46  
47 #------------------------------------------------------------------------------
48  
49 0 ▶sub args_from_stdin { return 1 }
Subroutine args_from_stdin: not called CC=1 SCAR=6.9
Pod undocumented
50  
51 #------------------------------------------------------------------------------
52  
53 0 ▶sub execute {
Subroutine execute: not called CC=2 SCAR=17.9
Pod documented
54 0 my ( $self, $opts, $args ) = @_;
55  
56 0 my $global_opts = $self->app->global_options;
57  
58 die "Cannot look into remote repositories (yet)\n"
59 0 ▶ if is_remote_repo( $global_opts->{root} );
Branch: 1 branch
BranchTrueFalseTotal
if is_remote_repo($global_opts->{"root"}) 0 0 0
60  
61 0 return $self->SUPER::execute($opts, $args);
62 };
63  
64 #------------------------------------------------------------------------------
65  
66 1 1;
67  
68 __END__
« blib/lib/Pinto/Role/PauseConfig.pm ↑ Summary blib/lib/App/Pinto/Command/help.pm »