in reply to Polysignant variables

I've thought about references to different (incompatible signet, as opposed to conforming class) types with respect to overloading.

For example, a parameter can be a scalar meaning a string containing glob syntax, a qr meaning a Perl regular expression, or a sub ref, meaning a function that performs the match.

In Tk, an item can be a string representing the name of the member to trigger, a sub meaning call that, or an array ref, meaning call with arguments.

In those cases, good engineering would be to make them seem the same asap, or isolated. For example, in my matcher, I turn whatever it was into a sub, then deal only with that. In Tk, the "call this" function can be isolated, and it's just tramp data everywhere else.

I think reusing a local variable for different purposes throughout a body of code is bad coding.

—John