Bat-Interpreter
view release on metacpan or search on metacpan
lib/Bat/Interpreter/Delegate/Executor/DryRunner.pm view on Meta::CPAN
package Bat::Interpreter::Delegate::Executor::DryRunner;
use utf8;
use Moo;
use Types::Standard qw(ArrayRef);
use namespace::autoclean;
with 'Bat::Interpreter::Role::Executor';
our $VERSION = '0.025'; # VERSION
has 'commands_executed' => ( is => 'ro',
isa => ArrayRef,
default => sub { [] },
);
sub add_command {
push @{ shift->commands_executed }, @_;
}
has 'for_commands_executed' => ( is => 'ro',
isa => ArrayRef,
default => sub { [] },
);
sub add_for_command {
push @{ shift->for_commands_executed }, @_;
}
sub execute_command {
my $self = shift();
my $command = shift();
$self->add_command($command);
return 0;
}
sub execute_for_command {
my $self = shift();
my $command = shift();
$self->add_for_command($command);
return ''; #
}
1;
__END__
=pod
=encoding utf-8
=head1 NAME
Bat::Interpreter::Delegate::Executor::DryRunner
=head1 VERSION
version 0.025
=head1 SYNOPSIS
use Bat::Interpreter;
use Bat::Interpreter::Delegate::Executor::DryRunner;
my $dry_runner = Bat::Interpreter::Delegate::Executor::DryRunner->new;
( run in 2.672 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )