P
Pavel Hlavnicka
Hi all,
this is a bit advanced question. I'm developing and application which is
a finite state automaton, where actions to be take on particular state
are described in an external configuration files as a Perl expressions.
To keep the code as safe as possible, I want to allow only particular
function names and variable names might be used in such external
expressions and run a Perl interpreter in a taint mode.
What I need is to pre-check the expression to be evaluated. Regular
expression could become quite complex for this stuff, while walking the
byte code tree seems to be a simple recursive algorithm.
Problem is, that I have no clue where to start and I'm to lazy
and
under such a time pressure that I need your help. {Please give me some
tips, where to start and how to walk a instruction tree. All I need is
to quit if non-desired tree item is met. I think 'B' module family is
the solution.
Thank you VERY much in advance.
Pavel
this is a bit advanced question. I'm developing and application which is
a finite state automaton, where actions to be take on particular state
are described in an external configuration files as a Perl expressions.
To keep the code as safe as possible, I want to allow only particular
function names and variable names might be used in such external
expressions and run a Perl interpreter in a taint mode.
What I need is to pre-check the expression to be evaluated. Regular
expression could become quite complex for this stuff, while walking the
byte code tree seems to be a simple recursive algorithm.
Problem is, that I have no clue where to start and I'm to lazy
under such a time pressure that I need your help. {Please give me some
tips, where to start and how to walk a instruction tree. All I need is
to quit if non-desired tree item is met. I think 'B' module family is
the solution.
Thank you VERY much in advance.
Pavel