in reply to Looking for a state machine
Now, I have been warned by our own local celebrity merlyn that you have to be wary of turning into "every problem looks like a nail to me with my new shiny hammer" guy. However, I have to admit that lately, 99% of the code that I've written I've been decomposing into state machines, and using POE as my "framework of choice." Though I definetly agree that if you can parse it using thedamian's lovely Parse::RecDescent you probably should give that a whack, I've had lovely luck here as of late following a simple methodology.
- Break down problem into discrete states
- Define transitions between those states
- Implement states as a POE::Session
- Set up driver for dataflow as entry point into POE (in this case get the file pumping into the POE system)
- Lean back and enjoy your productivity
|
---|
In Section
Seekers of Perl Wisdom