Subject: | POE::NFA api |
I would suggest two additions to the POE::NFA api.
First, i think it would be good to have a normal HEAP for each NFA
session, not just the runstate. It occurred to me, that there often is
some data that has to be available in every state. (For example a
ReadWrite wheel, which can be shutdown from whichever state, and so on)
Further, i would suggest adding three new parameters to the ->spawn()
method:
heap => {} # put something in the heap
runstates => {
initial => {}, # data that is available in $_[RUNSTATE] in the
# initial state.
}
I think those two things are very important to make POE::NFA useable, if
you can't initially put something into the NFAs heap, you need to use
dirty workarounds (posting the data, putting it into a glob, or whatever)