in reply to Naming Subs
I don't remember which of the many possible ways I used to turn the variable into an actual function call. I think today $action->() would do the trick.
But, this is a problem with release code because the user could trigger a jump to any function in the code, not just those you are intending! So to make it more robust I named the option functions something distinct, with a prefix on the verb. E.g. "get" would call sub option_get. If the user typed foo instead, it would complain about the lack of an option_foo, rather than jump to sub foo. Only the intended targets had names of this form.
—John
|
|---|