Re: Need some help...
Olivier Mengué <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Message-ID | <[email protected]> |
2009/6/14 Phil Whelan <[email protected]> > 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 )) ], ],