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

filter: Statementstmt 64.7% 11 / 17 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 51.6% 16 / 31 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/Pinto/Chrome/Net.pm ↑ Summary blib/lib/App/Pinto/Command/lock.pm »
1 # ABSTRACT: do nothing
2  
3 package App::Pinto::Command::nop;
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 ( [ 'sleep=i' => 'seconds to sleep before exiting' ], );
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 0 $self->SUPER::validate_args( $opts, $args );
30  
31 $self->usage_error('Sleep time must be positive integer')
32 0 ▶ if defined $opts->{sleep} && $opts->{sleep} < 1;
Branch: 1 branch
BranchTrueFalseTotal
if defined $opts->{"sleep"} and $opts->{"sleep"} < 1 0 0 0
Condition0%0/3
defined $opts->{"sleep"} and $opts->{"sleep"} < 1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $opts->{"sleep"} and $opts->{"sleep"} < 1
defined $opts->{"sleep"} $opts->{"sleep"} < 1
Truth table0%0/3
A and B
A= defined $opts->{"sleep"}B= $opts->{"sleep"} < 1
ABresult
0X0
100
111
33  
34 0 return 1;
35 }
36  
37 #------------------------------------------------------------------------------
38 1 1;
39  
40 __END__
« blib/lib/Pinto/Chrome/Net.pm ↑ Summary blib/lib/App/Pinto/Command/lock.pm »