in reply to I'm in trouble with Perl's OO programming
Inheritance does not work when you access WatchLog and SendEmail as subroutines. In fact for the sake of symmetry I would use a method invokation for AddLocalTime or at least change the name to _AddLocalTime to indicate that it is a local class method intended for use within the class.
use base A .... sub Schedule { my ($self) = @_; $self->addTab(_AddLocalTime); $self->addTab($self->WatchLog); $self->addTab($self->SendEmail); } sub _AddLocalTime { }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: I'm in trouble with Perl's OO programming
by chromatic (Archbishop) on Jun 09, 2005 at 17:32 UTC | |
by guha (Priest) on Jun 09, 2005 at 20:30 UTC |
In Section
Seekers of Perl Wisdom