Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This allows me to inspect my local copy of %INC after a module has been required so that I can see what modules have been loaded after the fact. However, the data returned doesn't provide any clues as to the order in which the modules were loaded. So I only know that then end result of requiring Module::A is that Module::B and Module::C were loaded; but I can't tell if Module::A loaded Module::C directly or if Module::C was loaded by Module::B. So, what I am hoping to do is replace my local %INC with a tied hash that would allow me to inspect the contents of %INC as the modules are being 'required'. Here are my questions:sub get_inc { my $module = shift; local %INC; eval { require $module }; return keys %INC }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module Loading Tool
by jasonk (Parson) on Aug 14, 2008 at 00:56 UTC | |
|
Re: Module Loading Tool
by betterworld (Curate) on Aug 14, 2008 at 00:13 UTC | |
by Anonymous Monk on Aug 14, 2008 at 00:55 UTC | |
|
Re: Module Loading Tool
by Khen1950fx (Canon) on Aug 14, 2008 at 00:21 UTC | |
|
Re: Module Loading Tool
by tod222 (Pilgrim) on Aug 14, 2008 at 01:02 UTC |