Revision history for Perl extension FSA::Rules.
0.21 2004-12-31T18:30:20
- Calling reset() now empties the machine hashref and state hashrefs.
[Curtis & David]
- User can now turn text wrapping off and on for nodes and labels.
[Curtis]
- states() will now croak if called with any non-existent states.
[Curtis]
- Added "decorate => 1" attribute to graphs to have lines drawn from
the edge to its corresponding label. [Curtis]
- Changed "label_wrap" to "text_wrap" and had it apply to all text.
[Curtis].
- Added "Text::Wrap" as a requirement. [Curtis]
- Fixed documentation typo--rule actions specified via a hash reference
rule spec are keyed off the word "action", not "actions". [David]
- Actions specified via a hash reference rule specification can now
take a code reference as well as an array referencde of code
references. [David]
0.20 2004-12-24T18:38:57
- Modified Synopsis to show off the result() method.
- Other minor documentation fixes spotted by Curtis Poe.
- Added graph support. [Curtis Poe]
- Added at() method. [Curtis Poe]
- Simplified synopsis. [Curtis Poe]
- Added "state_class" parameter to simplify subclassing FSA::State.
- A rule defined as a false scalar value, rather than a code reference,
now works properly.
- A successful attempt to switch states with the "strict" attribute
enabled now succeeds if no other rules evaluate to true.
- Each rule may now take an optional hash reference instead of a code
or array reference. The hash reference may optionally specify a
rule label, which eases the tracking of rules and allows graphs to
generate rule labels. [Curtis Poe]
- Changed the state() method to curr_state(). The old name has been
deprecated, will issue a warnning when called, and will be removed in
a future version.
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 compatibility
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-existent 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 stack trace 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 pristine 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).