blib/lib/Pinto/Action/Roots.pm

filter: Statementstmt 80.0% 24 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 78.9% 30 / 38 CC 2 SCAR 8.1
CC
2
Cov
80%
execute
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« blib/lib/Pinto/Statistics.pm ↑ Summary blib/lib/Pinto/Action/Log.pm »
1 # ABSTRACT: Show the roots of a stack
2  
3 package Pinto::Action::Roots;
4  
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use MooseX::Types::Moose qw(Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use MooseX::MarkAsMethods ( autoclean => 1 );
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Pinto::Util qw(whine);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Pinto::Types qw(StackName StackDefault StackObject);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 #------------------------------------------------------------------------------
14  
15 1 our $VERSION = '0.14'; # VERSION
16  
17 #------------------------------------------------------------------------------
18  
19 1 extends qw( Pinto::Action );
20  
21 #------------------------------------------------------------------------------
22  
23 1 has stack => (
24 is => 'ro',
25 isa => StackName | StackDefault | StackObject,
26 default => undef,
27 );
28  
29 1 has format => (
30 is => 'ro',
31 isa => Str,
32 default => '%a/%f',
33 lazy => 1,
34 );
35  
36 #------------------------------------------------------------------------------
37  
38 0 ▶sub execute {
Subroutine execute: not called CC=2 SCAR=17.9
Pod undocumented
39 0 my ($self) = @_;
40  
41 0 my $stack = $self->repo->get_stack($self->stack);
42 0 my @roots = sort map { $_->to_string($self->format) } $stack->roots;
43 0 $self->show($_) for @roots;
44  
45 0 return $self->result;
46 }
47  
48 #------------------------------------------------------------------------------
49  
50 1 __PACKAGE__->meta->make_immutable;
51  
52 #------------------------------------------------------------------------------
53  
54 1 1;
55  
56 __END__
« blib/lib/Pinto/Statistics.pm ↑ Summary blib/lib/Pinto/Action/Log.pm »