Well to answer my own question I saw this example:
POE::Session->create
(
package_states =>
## extract all subroutines that don't start with "__"
## and allocate them as states:
[ (__PACKAGE__) => [ do {
no strict 'refs';
grep { !/^__/ and defined &$_ } keys %{ __PACKAGE__ . "::" };
} ] ],
## pass args into _start:
args => [...@_],
);
On Fri, May 1, 2009 at 12:58 PM, Josh803316 <[email protected]> wrote:
> If I want to call a single session with states loaded from a hash.....what
> is the best way to do this?
>
> inline_states => [
> _start => sub {},
> _stop => sub{},
> %subs
> ]
>
> inline_states => [
> _start => sub {},
> _stop => sub{},
> $key => $subs{$key}
> ]
>