bschmer has asked for the wisdom of the Perl Monks concerning the following question:
At my place of employment, we have a several "command interpreters" that take a files such as
The more complex of the interpreter uses Parse::RecDescent but I'd like to avoid pulling all of the Perl syntax into the interpreter. I've also poked around with Filter::Simple to wrap the non-perl lines by calls to subroutines to handle things but it doesn't "feel" right.
How would you handle this situation?
or evencommand1 param1=value1 param2=value2 command2 param3=value3 param4=value4
there are some other constructs in the "language" but those are the basics. The problem is that I'd like to be able to intersperse Perl amongst the commands such that I can have "scripts" such asparallel { command1 param1=value1 param2=value2 command2 param3=value3 param4=value4 }
without changing the format of files that don't have embedded Perl code.command1 param1=value1 param2=value2 <?perl if ($last_command_status == FAIL){ ?> debugging_command debug_param1=debug_value1 <?perl } ?> command2 param1=value1 param2=value2
The more complex of the interpreter uses Parse::RecDescent but I'd like to avoid pulling all of the Perl syntax into the interpreter. I've also poked around with Filter::Simple to wrap the non-perl lines by calls to subroutines to handle things but it doesn't "feel" right.
How would you handle this situation?
Back to
Seekers of Perl Wisdom