Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: possible to repeat if statement?

by NetWallah (Abbot)
on May 04, 2013 at 16:31 UTC ( #1032059=note: print w/ replies, xml ) Need Help??


in reply to [SOLVED] possible to repeat if statement?

What you have implemented can be categorized as a "state machine", or "workflow".

More formal implementations of this are "data-driven", which means that each STATE and CONDITION combination drives you to either a new STATE or ACTION.
All this is defined in a single data-structure (or "rule" type file).

If you can restructure your program around this idea, it will become more stable, and extensible.
However- you pay the up-front cost in engine implementation, and having to consider every STATE/CONDITION combination.
There are several modules that can help - I don't have sufficient experience with them to advise. Search on the keywords "state machine", or "workflow".

             "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
        -- Dr. Cox, Scrubs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032059]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2016-06-27 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (339 votes). Check out past polls.