Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: possible to repeat if statement?

by NetWallah (Canon)
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032059]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2018-05-28 10:21 GMT
Find Nodes?
    Voting Booth?