On Sat, Sep 02, 2000 at 03:18:06PM -0400, Mike Lambert wrote:
> In certain cases, like the one in which you
> proposed, you'd want to explicitly bypass the parent DESTROY.
> 
> sub DESTROY {
>   my $self = shift;
>   $self->UNIVERSAL::DESTROY(@_);
> }
> 
> would skip the automatic chaining because the function contains an
> explicit call to a superclass's DESTROY. 

As you said, sounds difficult to implement and difficult to document.
Too much magic.


> In cases of more complex class hierarchies, you can explicitly call
> one parent class's DESTROY, and skip anothers.

Bad, bad, bad.  Busts encapsulation, poking around in your parent's
hierarchy.


Just to make it clear, I agree, in principle, with chaining DESTROY
and SETUP.  I'd just like to see all the caveats cleared away first.
We already have a system that kinda works, there's no point in
replacing it with another that only kinda works.

Also, its not entirely clear why method chaining is desired only for
constructor and destructors.  What about every other method?


-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
BOFH excuse #177:

sticktion

Reply via email to