That's basically where I landed too, and the approach I'm going to take. I started looking at
Module::Info and it already does the 'use' and 'require' parts. I'm going to try to add:
- option to exclude pragmata; it currently spits out stuff like 'strict' from 'use strict' as a module
- search for RootClass, which can be used in DBI connect
- search for Class::DBIs has_a which can inflate something into an object of a specified class;
I know we have the last two items in our code base for sure. As others turn up, I'll add them too.