Re: Listing all modules used by program?
- From: "harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT] net">
- Date: Sat, 18 Feb 2006 23:01:07 -0500
Pat Deegan wrote:
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.
If by "used" you mean as in the Perl built-in "use", will this do it for you?
foreach (sort keys %INC) {print "$_\n"}
This needs to be inserted _after_ you are certain you have loaded all the modules you are going to load. To be safe, do it just before you exit.
Tom Wyant
.
- Follow-Ups:
- Re: Listing all modules used by program?
- From: Pat Deegan
- Re: Listing all modules used by program?
- References:
- Listing all modules used by program?
- From: Pat Deegan
- Listing all modules used by program?
- Prev by Date: Re: Math::GMP Make Test error on Itanium running HP-UX 11.23
- Next by Date: Re: Listing all modules used by program?
- Previous by thread: Listing all modules used by program?
- Next by thread: Re: Listing all modules used by program?
- Index(es):