On Wed, Sep 26, 2007 at 14:16:37 +0200, Shmuel Fomberg wrote:
> Hello There.
>
> > Yuval Kogman Wrote:
>
> >> sub UNIVERSAL::DESTROY {}
> >> And no worries.
> >
> >What if some class implements an AUTOLOAD that is specifically
> >interested in catching DESTROY?
>
> That depends: if you are talking about a class that he wrote, then he can
> fix it.
> But if you are talking about CPAN module, then the module simply should not
> do that. No, really. Because you are thinking about DESTROY, but what about
> CLONE? CLONE_SKIP? FETCH? Some new internal name FFDSGRE_DO for some new
> functionality?
> Using AUTOLOAD in CPAN module is very dangerous, because the author can
> never know the surrounding conditions. But silently ignore all the capital
> letter functions and physically implement the ones that it needs is the
> basic requirement.
Polluting UNIVERSAL is much more dangerous IMHO
--
Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org 0xEBD27418
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl