drfrog has asked for the wisdom of the Perl Monks concerning the following question:

heyo:

im trying to figure out how to maintain a sense of state transition without if/else conditions

is there a way? im thinking there must be but i cant seem to find any documentation on it

for instance say the user calls a script and there is flow it can go through
what solutions are there, again running under modperl?

thanks again

Replies are listed 'Best First'.
Re: state transitions in modperl
by perrin (Chancellor) on Apr 16, 2002 at 03:19 UTC
    There are about a million ways to do this. Some that have been coded up into frameworks and run on mod_perl include CGI::Application, Apache::PageKit, and OpenInteract. Of course we're basically just talking about a dispatch table here. No serious magic. I think CGI::MxScreen actually tries to control which states you can go to in which order.
Re: state transitions in modperl
by Dogma (Pilgrim) on Apr 16, 2002 at 06:31 UTC
    I recently asked a similar question: CGI Design. The best solution was using a hash based dispatch table.

    Good Luck,
    -Dogma