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

filter: Statementstmt 57.8% 11 / 19 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 53.1% 17 / 32 CC 3 SCAR 16.8
CC
3
Cov
48%
validate_args
12.0
command_names
2.0
opt_spec
2.0
CRAP 5.4
« blib/lib/App/Pinto/Command/revert.pm ↑ Summary blib/lib/Pinto/Role/Committable.pm »
1 # ABSTRACT: show the revision logs of a stack
2  
3 package App::Pinto::Command::log;
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 command_names { return qw(log history) }
Subroutine command_names: not called CC=1 SCAR=6.9
Pod documented
19  
20 #------------------------------------------------------------------------------
21  
22 0 ▶sub opt_spec {
Subroutine opt_spec: not called CC=1 SCAR=6.9
Pod documented
23 0 my ( $self, $app ) = @_;
24  
25 return (
26 0 [ 'stack|s=s' => 'Show history for this stack' ],
27 [ 'with-diffs|d' => 'Show a diff for each revision'],
28 [ 'diff-style=s' => 'Diff style (concise|detailed)' ],
29 );
30 }
31  
32 #------------------------------------------------------------------------------
33  
34 0 ▶sub validate_args {
Subroutine validate_args: not called CC=3 SCAR=24.8
Pod documented
35 0 my ( $self, $opts, $args ) = @_;
36  
37 0 ▶ $self->usage_error('Multiple arguments are not allowed') if @{$args} > 1;
Branch: 1 branch
BranchTrueFalseTotal
if @{$args;} > 1 0 0 0
38  
39 0 ▶ $opts->{stack} = $args->[0] if $args->[0];
Branch: 1 branch
BranchTrueFalseTotal
if $args->[0] 0 0 0
40  
41 0 return 1;
42 }
43  
44 #------------------------------------------------------------------------------
45  
46 1 1;
47  
48 __END__
« blib/lib/App/Pinto/Command/revert.pm ↑ Summary blib/lib/Pinto/Role/Committable.pm »