The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Bat::Interpreter::Delegate::Executor::PartialDryRunner - Executor for executing for commands and printing out the rest

SYNOPSIS

    use Bat::Interpreter;
    use Bat::Interpreter::Delegate::Executor::PartialDryRunner;

    my $partial_dry_runner = Bat::Interpreter::Delegate::Executor::PartialDryRunner->new;

    my $interpreter = Bat::Interpreter->new(executor => $partial_dry_runner);
    $interpreter->run('my.cmd');
    
    print Dumper($partial_dry_runner->commands_executed);
     

DESCRIPTION

This executor tries to get all the commands that are going to be executed, that is, it's like every command gets "echoed" in the "standard output" as an array of lines

The commands printed can be different to the real execution if the bat/cmd file makes some sort of conditional using ERRORLEVEL

METHODS

execute_command

Execute general commands.

This executor just register the command in the attribute: commands_executed

execute_for_command

Execute commands for use in FOR expressions. This is usually used to capture output and implement some logic inside the bat/cmd file.

This executor executes this commands via perl subshell: ``