in reply to Making my own control flow structure
Have you ever seen the Runops::Switch module (available from the CPAN).
That module allows you to override the way that perl interprets its opcodes.
I *imagine* that you could combine the techniques used in that module, together with the B::Deparse module in order to do what you want.
From what I remember, all "if" and "unless" statements in perl are internally translated into "AND" (or "OR") statements. So:- if(i > 3) { print "bob" } is internally the same as i > 3 && print "bob". So you probably want to start by looking at overriding the OP_AND opcode....
|
|---|