2009/6/14 Phil Whelan <phil...@gmail.com> > Which should be > > POE::Session->create( > object_states => [ > $self => [ qw( _start _start ) ], > ], >
I'm using this style if my methods have the same name as my events : POE::Session->create( object_states => [ $self => [ map { ($_, $_) } qw( _start other ) ], ], But I prefer to distinguish event handlers by prefixing them with "_event_", so I'm using this : POE::Session->create( object_states => [ $self => [ (map { ("_event$_", $_) } qw( _start _stop )), (map { ("_event_$_", $_) } qw( tick tock )) ], ],