> well if all of these states are in the same session you should
> put the wheel
> reference on the heap and rather post an update event to your
> fetch session.
> using wheels with several sessions is probably not good, since wheels will
> post states always back to their parent session. and you could
> use post instead
> of call to run the code above.
> and it might be good if you include a short layout of your
> sessions and how
> you suppose them to interact next time. but if you have this, it's almost
> done anyway :)

Actually, my DBFetch session is seperate from the StreamServerSession
session, which is the recipient of the connection and its associated wheel.
This is the reason I pass the wheel reference directly instead of via
heap... they are different heaps.

To invoke the fetch state in DBFetch, I use the following call in the
StreamServerSessions's got_line state:

$kernel->call( db => fetch => $line, $heap->{wheel} )
  or die "couldn't execute db::fetch: $!";

And the reason I do that is because all of the session data is local to the
DBFetch (object|package|session)'s namespace.

L8r,
Rob

Reply via email to