- COPYRIGHT AND LICENSE
use Bat::Interpreter; use Bat::Interpreter::Delegate::Executor::DryRunner; my $dry_runner = Bat::Interpreter::Delegate::Executor::DryRunner->new; my $interpreter = Bat::Interpreter->new(executor => $dry_runner); $interpreter->run('my.cmd'); print Dumper($dry_runner->commands_executed);
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
Bat::Interpreter::Delegate::Executor::DryRunner - Executor for register all commands that get executed
Execute general commands.
This executor just register the command in the attribute: commands_executed
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 can't return the output so it always returns empty string
Pablo Rodríguez González <email@example.com>
This software is Copyright (c) 2018 by Pablo Rodríguez González.
This is free software, licensed under:
The MIT (X11) License