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

filter: Statementstmt 61.1% 11 / 18 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 55.1% 16 / 29 CC 3 SCAR 17.7
CC
3
Cov
50%
validate_args
12.0
opt_spec
2.0
BEGIN
1.0
CRAP 5.9
« blib/lib/App/Pinto/Command/lock.pm ↑ Summary blib/lib/App/Pinto/Command/statistics.pm »
1 # ABSTRACT: mark a stack as writable
2  
3 package App::Pinto::Command::unlock;
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 #-----------------------------------------------------------------------------
9  
10 1 ▶use base 'App::Pinto::Command';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 #------------------------------------------------------------------------------
13  
14 1 our $VERSION = '0.14'; # VERSION
15  
16 #------------------------------------------------------------------------------
17  
18 0 ▶sub opt_spec {
Subroutine opt_spec: not called CC=1 SCAR=6.9
Pod documented
19 0 my ( $self, $app ) = @_;
20  
21 0 return ( [ 'stack|s=s' => 'Unlock this stack' ], );
22 }
23  
24 #------------------------------------------------------------------------------
25  
26 0 ▶sub validate_args {
Subroutine validate_args: not called CC=3 SCAR=24.8
Pod documented
27 0 my ( $self, $opts, $args ) = @_;
28  
29 $self->usage_error('Multiple arguments are not allowed')
30 0 ▶ if @{$args} > 1;
Branch: 1 branch
BranchTrueFalseTotal
if @{$args;} > 1 0 0 0
31  
32 0 ▶ $opts->{stack} = $args->[0]
Branch: 1 branch
BranchTrueFalseTotal
if $args->[0] 0 0 0
33 if $args->[0];
34  
35 0 return 1;
36 }
37  
38 #------------------------------------------------------------------------------
39  
40 1 1;
41  
42 __END__
« blib/lib/App/Pinto/Command/lock.pm ↑ Summary blib/lib/App/Pinto/Command/statistics.pm »