Is it possible to check if a module is available for use in @INC, BUT without side effects?
I mean eval { "require MODULE" } will at least compile MODULE.pm and execute any BEGIN block inside at compile time.
Background: I have a project where I allow to dynamically add freely named modules via INC-hooks*, it would be nice to know beforehand if there are potential conflicts with already available modules.
TIA!
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
of course apart of the obvious solution to parse the dirs and hooks in @INC by myself, like shown in require
*) see require for explanation
In reply to Checking @INC for available modules without side-effects? by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |