Revision history for Perl extension FSA::Rules.
0.10 2004-12-17T23:29:54
- Moved state-specific methods to new FSA::State class. This is a
pretty significant change and can introduce backwards compatability
issues, so the version has been bumped up to 0.10.
- FSA::State objects are now passed to state actions, rather than the
FSA::Rules object. Call their machine() method to get the FSA::Rules
object.
- Switch actions are now passed two arguments: The current FSA::State
object and the FSA::State object for the new state.
- Added notes() method for storing arbitrary notes in the FSA::Rules
object.
- Added states() method to return one or more of the state objects in
a machine.
- Moved the "message" and "result" methods to the state class. The
"set_" forms are gone now, since you don't need to specify a state
when you have a state. Added last_message() and last_result()
methods to FSA::Rules to get the most recent messages and results
from the states.
- Added convenience methods prev_state(), notes(), and done() to the
state class to reach back into the FSA::Rules object.
- The start() method will now throw an exception if the machine is
already running. Call reset() before calling start on a running
machine.
- Added "strict" attribute to prevent rules from short-circuiting
and cause an exception to be thrown if more than one rule returns
a true value during a call to try_switch(). Suggested by Curtis
Poe.
- Added optional parameter hash reference as first argument to new().
It can force the machine to be started before being returned, or
can set the "done" or "strict" attributes.
0.07 2004-12-16T22:23:43
- Updated the synopsis to no longer document non-existant methods.
- Added notes about DFA vs. NFA state engines and how FSA::Rules
compares to the two models.
- Added state methods to allow easy caching and retrieval of state
results and messages. Also added stacktrace methods for easy
debugging. Implementation by Curtis Poe.
0.06 2004-12-16T02:05:01
- Added a stack() method to return an arrayref of state transformations.
Implementation by Curtis Poe.
- Added reset() which resets the state machine to a pristince state.
Implementation by Curtis Poe.
0.05 2004-12-16T00:50:49
- Changed C<try_switch()> to pass any arguments to each rule checking
code reference. These can be used as inputs in a classic DFA-style
rule table. Suggested by Paul Hoffman.
0.04 2004-12-16T00:19:41
- Changed done() to evaluate a code reference if a code reference is
what is passed to it. Suggested by Curtis Poe.
0.03 2004-12-15T23:45:39
- Fixed POD for search.cpan.org.
0.02 2004-12-15T22:01:58
- Changed name to FSA::Rules. Thanks to the module-authors list for the
feedback!
- Changed the "enter" and "leave" parameters to "on_enter" and
"on_exit", respectively. Suggested by Tim Bunce.
- Changed the check() method to switch() and modified it to return
the name of the state to which it switched.
- Added try_switch(), which returns the name of the state to which
it switched on success, and "undef" on failure.
- Changed the start() method to return the name of the start state.
- Added support for numbered states, including "0". Reported by
Curtis Poe.
- Changed the "goto" parameter to "rules" to better reflect their
role and for parity with the new module name.
- Added the "done" attribute and run() method. Suggested by Curtis
Poe.
- Added a check for duplicate state names in new(). Suggested by
Curtis Poe.
0.01 2004-12-15T07:12:22
- Initial public release (to module-authors@perl.org only).