Listing all modules used by program?



Greetings all,

I'm trying to figure out how to automatically list all the modules used by
a particular program.

The closest I've come is creating a CPAN autobundle but this includes
everything on the system, which isn't what I'm hoping for...

What I'd like is to create a .pm similar to CPANs snapshot autobundle but
which only includes the modules actually used by this program, thereby
allowing me to install all those (and only those) dependencies on a
different host with a minimum of manual labor.

The perltoc contains numerous "module" related entries but I didn't see
anything relevant. I thought it might be related to perlcc but the
manpage has no mention of such a function.

I'm certain I've managed this before -- anyone know how to accomplish this
feat?

Thanks in advance.

--
Pat Deegan,
http://www.psychogenic.com/
Registered Linux User #128131

.