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

filter: Statementstmt 66.6% 14 / 21 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 57.1% 20 / 35 CC 4 SCAR 22.6
CC
4
Cov
52%
validate_args
20.0
opt_spec
2.0
BEGIN
1.0
CRAP 9.6
« blib/lib/Pinto/Schema/Result/Stack.pm ↑ Summary blib/lib/App/Pinto/Command/migrate.pm »
1 # ABSTRACT: show or set stack properties
2  
3 package App::Pinto::Command::props;
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(interpolate);
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 opt_spec {
Subroutine opt_spec: not called CC=1 SCAR=6.9
Pod documented
21  
22 return (
23 0 [ 'format=s' => 'Format specification (See POD for details)' ],
24 [ 'properties|prop|P=s%' => 'name=value pairs of properties' ],
25 );
26 }
27  
28 #------------------------------------------------------------------------------
29  
30 0 ▶sub validate_args {
Subroutine validate_args: not called CC=4 SCAR=30.0
Pod documented
31 0 my ( $self, $opts, $args ) = @_;
32  
33 $self->usage_error('Cannot specify multiple stacks')
34 0 ▶ if @{$args} > 1;
Branch: 1 branch
BranchTrueFalseTotal
if @{$args;} > 1 0 0 0
35  
36 $opts->{format} = interpolate( $opts->{format} )
37 0 ▶ if exists $opts->{format};
Branch: 1 branch
BranchTrueFalseTotal
if exists $opts->{"format"} 0 0 0
38  
39 0 ▶ $opts->{stack} = $args->[0]
Branch: 1 branch
BranchTrueFalseTotal
if $args->[0] 0 0 0
40 if $args->[0];
41  
42 0 return 1;
43 }
44  
45 #------------------------------------------------------------------------------
46 1 1;
47  
48 __END__
« blib/lib/Pinto/Schema/Result/Stack.pm ↑ Summary blib/lib/App/Pinto/Command/migrate.pm »