Sorry, I mistyped an example (now corrected) that made it look like I wanted the behavior of a variable. That would indeed suggest an overload solution. I want it to be a function, with arguments in the actual case.
ikegami has pointed out the Want module. That should show me the way.