wolk a byte code tree

  • Thread starter Pavel Hlavnicka
  • Start date
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
 
B

Ben Morrow

Pavel Hlavnicka said:
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.

Have you investigated the Safe module?

Ben
 
P

Pavel Hlavnicka

Thank you very much, the Safe module seems to be quite sufficient. Sorry
for my ignorance :)

Pavel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top