dondelelcaro has asked for the wisdom of the Perl Monks concerning the following question:

Recently, I've found myself wishing that there was an easy way to decline to handle a method in AUTOLOAD and instead try other AUTOLOADs up and across the @ISA.

You can sort of fake it by using SUPER:: and/or calling your superclass AUTOLOADs directly, but frankly, that seems a little bit cludgish, and worse, it doesn't go across @ISA.

Does anyone have a better idea for me than calling my superclasses' AUTOLOAD directly or using SUPER::?
  • Comment on smart inheritance and overriding of AUTOLOAD

Replies are listed 'Best First'.
Re: smart inheritance and overriding of AUTOLOAD
by PodMaster (Abbot) on Oct 25, 2003 at 07:05 UTC
    I suggest you try reading perlmod (and related materials) and actually try some of these things out (you're talking about SUPER::, sure you can emulate it, but there is no point) bad example here

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: smart inheritance and overriding of AUTOLOAD
by sgifford (Prior) on Oct 25, 2003 at 06:23 UTC
    What don't you like about SUPER::?
      It looks like what he doesn't like about SUPER:: are the issues that TheDamian's NEXT attempts to solve.

      (Namely it doesn't play well with multiple inheritance = aka it doesn't go "across" the inheritance tree.)

        Ah! NEXT definetly looks like what I was looking for. I should have guessed that TheDamian would have already implemented it.

        Too bad that its not an integral part of the interpreter.