Interpreter/Delegate/Executor/DryRunner.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 43 CC 1 SCAR 6.9
CC
1
Cov
0%
add_command
2.0
add_for_command
2.0
execute_command
2.0
CRAP 2.0
1 package Bat::Interpreter::Delegate::Executor::DryRunner;
2  
3 use utf8;
4  
5 use Moo;
6 use Types::Standard qw(ArrayRef);
7 use namespace::autoclean;
8  
9 with 'Bat::Interpreter::Role::Executor';
10  
11 our $VERSION = '0.025'; # VERSION
12  
13 has 'commands_executed' => ( is => 'ro',
14 isa => ArrayRef,
15 default => sub { [] },
16 );
17  
18 sub add_command {
19 push @{ shift->commands_executed }, @_;
20 }
21  
22 has 'for_commands_executed' => ( is => 'ro',
23 isa => ArrayRef,
24 default => sub { [] },
25 );
26  
27 sub add_for_command {
28 push @{ shift->for_commands_executed }, @_;
29 }
30  
31 sub execute_command {
32 my $self = shift();
33 my $command = shift();
34 $self->add_command($command);
35 return 0;
36 }
37  
38 sub execute_for_command {
39 my $self = shift();
40 my $command = shift();
41 $self->add_for_command($command);
42 return ''; #
43 }
44  
45 1;
46  
47 __END__