Cees Hek wrote:

> Yes, except that in your subclass example, the fact that you create a
> new 'cgiapp_init' method will override the 'cgiapp_init' method in
> your base class.  That means the 'cgiapp_init' method in your base
> class will not get executed.  That may be desired, but if it is not,
> then you can call the 'cgiapp_init' method in the base class directly
> by adding the following line to your 'cgiapp_init' method in your
> subclass:
> 
> $self->SUPER::cgiapp_init(@_);

Or you can do what I've been doing lately and just have your base class
use the callback system to register it's init code. This makes it easier
for your subclasses since they even have to know that the base class
want's to do anything at init time.

  $self->add_callback(init => \&_my_init);

This won't work well however if you want to override your base's init in
the child class. Just another way to do it :)

-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to