I wanted tight control over the order of tests
use an array or arrayref to store your list of tests.
Many of my tests involve function calls, not just eq tests
a dispatcher can use a coderef (anonymous sub) to determine if the dispatch is to be used.
Intermediate results from earlier tests are saved in 'my' variables and used by later tests.
use a state variable of some sort that you pass to each dispatch selector. This would then hold your intermediate values.
Then again, I tend to oversimplify things.
--MidLifeXis
In reply to Re: Really Long if/elsif/else blocks
by MidLifeXis
in thread Really Long if/elsif/else blocks
by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |