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 :-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.