m-rau has asked for the wisdom of the Perl Monks concerning the following question:
I have a POE question. POE sessions can be implemented object-oriented. Question is, how to access overwritten methods?
This does not work, since $self -> SUPER::client_start pushes $self on to @_, I guess.
sub new { # object creation my $class = shift; my $self = { }; bless ($self, $class); # session creation POE::Session -> create( object_states => [ $self => { _start => 'client_start', }, ], ); return $self; } sub client_start { # this is an overwritten method!!! my ($self, $kernel, $heap, $session) = @_[ OBJECT, KERNEL, HEAP, S +ESSION ]; # child code goes here # [...] # now, access the overwritten parent method $self -> SUPER::client_start( @_ ); }
This does not work, since $self -> SUPER::client_start pushes $self on to @_, I guess.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: POE OO sessions - accessing overwritten methods
by Tanktalus (Canon) on Feb 11, 2005 at 15:06 UTC | |
by m-rau (Scribe) on Feb 12, 2005 at 10:44 UTC | |
by Tanktalus (Canon) on Feb 12, 2005 at 15:30 UTC | |
by m-rau (Scribe) on Feb 12, 2005 at 16:29 UTC | |
by Tanktalus (Canon) on Feb 12, 2005 at 16:48 UTC | |
| |
by BrowserUk (Patriarch) on Feb 12, 2005 at 18:54 UTC | |
Re: POE OO sessions - accessing overwritten methods
by holli (Abbot) on Feb 11, 2005 at 16:06 UTC |
Back to
Seekers of Perl Wisdom