Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Getting name of sub from a hash-based dispatch table?

by BUU (Prior)
on Jan 21, 2004 at 21:47 UTC ( [id://323029]=note: print w/replies, xml ) Need Help??


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]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://323029]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-19 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found