Hi,

I've been working on a PoCo::Client::FTP module and am using POE::NFA to run 
the FTP protocol. But there are some things that aren't really clear, at least
to me.
I'd like to know wether one should return the machine's reference to spawn()'s
caller or just use it to put the machine into its first state. Not returning
the reference and handling externally forced state transitions by poe_nfa_
messages is probably cleaner. but you would need a predefined start
state/event to make this complete.
another thing: is there a way to directly call a state's event handler
without using invoke_state directly? although the docs say goto_state calls
the specified event's handler, the code looks like a state transitions
is being posted.
a callable handler returning the machine's current state could be useful too.
(as machines are supposed to stop after processing their input, the owner
could check which stop state it is in or how it is progressing)
what about a possibility to define handlers common to all states? one could
use that for the handler above or to handle _stop events (they'd need to
be posted, too) and postback the machine's stop state.

and i'd be interested in how other users think about some kind of error
handling / result posting guidelines. up to now giving commands is similar
among the components. returning values doesn't seem to.


torvald

Reply via email to