Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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


Comment on Re: possible to repeat if statement?

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 avoiding work at the Monastery: (10)
As of 2014-07-28 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (210 votes), past polls