On Feb 18, 2008 6:57 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Mark Wagner wrote: > > Is there any easy way to get a list of all modules loaded by a Perl script? > > $ perl -le' use Time::Local; print for keys %INC ' > warnings/register.pm > Carp.pm > vars.pm > strict.pm > Exporter.pm > constant.pm > Time/Local.pm > warnings.pm > Config.pm > integer.pm snip
Of course, this assumes the author did not do anything like eval "use SomeModule" if $ENV{USE_SOMEMODULE}; or the sort of tricks that the DBI and other factory classes use. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/