Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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]
[holli]: the inventor of Ramen should get a Nobel prize

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2017-12-13 01:46 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (344 votes). Check out past polls.