in reply to Using import to generate subroutines
Take a look at the source code for Exporter, and similar modules such as Exporter::Lite and UNIVERSAL::exports.