NAME
BATsh::CMD - Pure Perl cmd.exe interpreter for BATsh
SYNOPSIS
# Used internally by BATsh; not normally called directly.
BATsh::CMD::exec_block('BATsh::CMD', \@lines, _batsh => $batsh);
DESCRIPTION
BATsh::CMD implements the Windows cmd.exe command set entirely in Perl. No external cmd.exe is required.
Supported Commands
ECHO, @ECHO OFF/ON
SET VAR=value, SET /A expr
IF "A"=="B" ... ELSE ..., IF EXIST, IF DEFINED, IF ERRORLEVEL, IF NOT
FOR %%V IN (list) DO ..., FOR /L %%V IN (s,step,e) DO ...
GOTO :label, :label
CALL :label [args], CALL file.batsh
SETLOCAL, ENDLOCAL
CD / CHDIR, DIR
COPY, DEL / ERASE, MOVE, MKDIR / MD, RMDIR / RD, REN / RENAME
TYPE, PAUSE, EXIT [/B] [code], CLS, TITLE, VER, PUSHD, POPD
Variable Expansion
%VAR% references are expanded before each line executes. %%V in FOR loops is protected from premature expansion and substituted with the loop value on each iteration.
AUTHOR
INABA Hitoshi <ina@cpan.org>
LICENSE
Same as Perl itself.