in reply to Getting methods existing in a Perl Object!

Any automated way to do this will also turn up class methods, private methods and non-methods (regular subs not expecting to be called via a method call).

If all you are looking for is to see if a method exists, see "can" in UNIVERSAL.

Why do you want to do this? In general, your subclass shouldn't know or care what methods the superclass has.

  • Comment on Re: Getting methods existing in a Perl Object!

Replies are listed 'Best First'.
Re^2: Getting methods existing in a Perl Object!
by Ace128 (Hermit) on Dec 27, 2006 at 03:43 UTC
    I wanna load a class in, and see what methods/functions exists (and those inherited from the parent class also, since, well, those are available aswell). I wanna be able of getting those since I'm gonna use the information for autocompletion... That way it's all gonna be easier - you dont have to check some API/or the module... :)
      Ah, autocompletion is a very reasonable thing to want. Hope liverpole's solution is working well for you.