in reply to Re: Symbol table globbing from object refs
in thread Symbol table globbing from object refs

This should give you a list of all functions available to a given object
I think some Autoloaded functions (such as accessors) may be missed, unless they have been used before. I played with this idea from Conway's book Object Oriented Perl, p91, pp114-7 a few years ago.

However, a user-centered design should document the public ones, and make their names available through some mechanism. What that mechanism should be, I'm not certain. I only raise the point to ask if this hole has a cover.

Update: I meant to ask "What is the convention for objects to communicate their method names to the outside world, given that Autoload may be employed?"

Update 2: Page numbers added.

-QM
--
Quantum Mechanics: The dreams stuff is made of

  • Comment on Re: Re: Symbol table globbing from object refs

Replies are listed 'Best First'.
Re: Re: Re: Symbol table globbing from object refs
by broquaint (Abbot) on Nov 29, 2003 at 22:36 UTC
    I think some Autoloaded functions (such as accessors) may be missed
    Indeed, since an AUTOLOADed subroutine can be almost anything they're more or less impossible to test for. But this is also basically the same situation for any run-time generated subroutines, so any attempts at getting all available methods naively can only be so effective.
    HTH

    _________
    broquaint

Re: Re: Re: Symbol table globbing from object refs
by ysth (Canon) on Nov 30, 2003 at 02:05 UTC
    Ideally all AUTOLOADable methods will be declared:
    sub mymethod1; sub mymethod2; ...
    In practice, its not always done.