in reply to Getting name of sub from a hash-based dispatch table?

Perhaps I'm missing something, but why don't you just not put the private subs in the hash table?
  • Comment on Re: Getting name of sub from a hash-based dispatch table?

Replies are listed 'Best First'.
Re: Re: Getting name of sub from a hash-based dispatch table?
by theguvnor (Chaplain) on Jan 22, 2004 at 14:47 UTC

    Because then they would not be able to be called at all through the general dispatch. The problem isn't in hiding them from the dispatch; it's in hiding certain ones from a menu or help system so that the user is not presented with options that make no sense in a given context.

    But as has already been noted by others, perhaps the best solution is to make the data structure for the dispatch table a little more complex/sophisticated so it can contain the public/private attribute.

    [Jon]