in reply to Identify subs and their source
This is similar to what autoclean and Moose does.
I think if you use the Sub::Name module, you can find out the full name that the sub was declared in. That will tell you if it was imported.