On Sun, 17 Aug 2003, Mark Fowler wrote:

<snip>

> You shouldn't.  Really.  You should subclass the other method.
>
> package Foo;
> use base qw(Bar);
>
> sub fred
> {
>   my $self = shift;
>   $self->wibble;
>   $self->wobble;
> }
>
> Then:
>
>   use Foo;
>   my $foo = Foo->new();  # the new method is called automatically in Bar.

Assuming that the developer of the original module properly used the 2
argument form of bless....  Ran into something a while back where was
trying to extend a module, and I spent about 1.5 hours figuring out why my
additions weren't working, until I realized that the base module was using
single-argument bless....grr!

Mark.



Reply via email to