Thanks for your advice. But from my point of view, there is a problem with this solution.
Designing
client_start like this breaks down the regular call of the parent's
client_start. In OO design, the
OBJECT constant contains
0 and the
KERNEL constant contains
1. If I remove
$self from
@_,
KERNEL still refers to
1 and I cannot access it utilizing
my ($self, $kernel, $heap, $session) = @_[ OBJECT, KERNEL, HEAP, SESSION ];.
But I found the solution in
http://poe.perl.org/?POE_Cookbook/Object_Methods:
Disadvantages
* Some people don't like OO.
* Because @_ has so much in it, one has to do silly
things like shift(@_)->SUPER::subroutine(@_);
to call parent POE-related methods.
With this rational to access overwritten parent methods,
client_start can keep
my ($self, $kernel, $heap, $session) = @_[ OBJECT, KERNEL, HEAP, SESSION ];.
The solution is in sync with your advice and with
holli's very general comment, too. Problem is, that both advices do not really reflect the special POE object design :-)