Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How to find Modules used by a Given Module
February 3, 2009, 8:47 am
rate this thread
module/script uses directly or indirectly.
% perl magic.pl < Input.pm
where Input.pm uses GetOpt::Long and MyModule. MyModule in turn uses
EveryModule. Note that one is a standard module and the other two are
Re: How to find Modules used by a Given Module
The following should give you the list of modules loaded right after
loading the module some::Module:
$ perl -MSome::Module -le 'print for keys %INC'
(Some post processing required)
But this only findes modules which is loaded at the same time as
Some::Module is loaded. Some modules will dynamically load other
modules at runtime. For example trying to print the modules loaded by
DBI wouldn't show any driver modules, which is very much needed by any
normal DBI using script.
- » Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
- — Previous thread in » PERL Discussions