in reply to Are state machines just for parsing?
This is actually what the Workflow module does. (I think someone else mentioned it too.) You can create:
- Actions to move from one state to another (or not change state at all)
- Conditions to see whether the current environment can execute an action (which changes state).
- Validators to check data coming into the system
All of these are simple Perl classes, and because there's a 'context' moving data into and out of the workflow it doesn't care where it's run, and neither do your classes.
I gave a presentation on it a couple months ago to the Pittsburgh Perlmongers that might be helpful, and it comes with working examples, decent docs, some tests, etc.
Chris
M-x auto-bs-mode
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Are state machines just for parsing?
by samtregar (Abbot) on Dec 08, 2004 at 22:03 UTC | |
by lachoy (Parson) on Dec 09, 2004 at 02:33 UTC |
In Section
Seekers of Perl Wisdom