blib/lib/Bat/Interpreter/Delegate/Executor/PartialDryRunner.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 3 / 3 totaltotal 100% 39 / 39 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Bat/Interpreter/Delegate/Executor/System.pm ↑ Summary blib/lib/Bat/Interpreter/Delegate/FileStore/LocalFileSystem.pm »
1 package Bat::Interpreter::Delegate::Executor::PartialDryRunner;
2  
3 23 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 23 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 23 ▶use Types::Standard qw(ArrayRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 23 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 23 with 'Bat::Interpreter::Role::Executor';
10  
11 23 our $VERSION = '0.023'; # VERSION
12  
13 has 'commands_executed' => ( is => 'ro',
14 isa => ArrayRef,
15 23 ▶ default => sub { [] },
Subroutine __ANON__: called CC=1 SCAR=0.0
16 23 );
17  
18 sub add_command {
19 29 ▶ push @{ shift->commands_executed }, @_;
Subroutine add_command: called CC=1 SCAR=0.0
Pod documented
20 }
21  
22 sub execute_command {
23 29 ▶ my $self = shift();
Subroutine execute_command: called CC=1 SCAR=0.0
Pod documented
24 29 my $command = shift();
25 29 $self->add_command($command);
26 29 return 0;
27 }
28  
29 sub execute_for_command {
30 1 ▶ my $self = shift();
Subroutine execute_for_command: called CC=1 SCAR=0.0
Pod documented
31 1 my $command = shift();
32 1 my $output = `$command`;
33 1 chomp $output;
34 1 return $output;
35 }
36  
37 23 1;
38  
39 __END__
« blib/lib/Bat/Interpreter/Delegate/Executor/System.pm ↑ Summary blib/lib/Bat/Interpreter/Delegate/FileStore/LocalFileSystem.pm »