Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Can I see "requires"?by tobyink (Canon) |
on Mar 08, 2012 at 15:47 UTC ( [id://958486]=note: print w/replies, xml ) | Need Help?? |
As others have already said, %INC. However, note that it's quite possible to directly manipulate this hash:
I have in the past had cause to directly manipulate %INC. A module I was using wanted to be passed the name of plugin module to use. It would require that plugin and then use it. However, I wanted to define the plugin inline in my code, a la
But this caused Something::That::Uses::Plugins to attempt to require the non-existent file "My/Plugin.pm". So...
And everybody's happy. But anyway, my point is that although %INC should give you the information you want, it can't necessarily be trusted 100%.
In Section
Seekers of Perl Wisdom
|
|