While I think this is a fun exercise, I would not want
to use it. Why? Because what a function does should be
similar enough in different contexts that there should be
tremendous code duplication. Enough that I would
discourage the unnecessary propagation of context, or the
rewriting of essentially the same subroutine.
But that philosophical issue aside, if you do put this on
CPAN, I strongly suggest doing validation of the passed
information. If someone accidentally types lsit instead
of list, the import should catch that...