Do you know where your variables are? | |
PerlMonks |
Re: Testing for a module's presenceby DrHyde (Prior) |
on Feb 07, 2005 at 10:52 UTC ( [id://428621]=note: print w/replies, xml ) | Need Help?? |
If you just want to know whether it exists you have little choice but to grovel over @INC.
If you try to eval "use Some::Module" then the module will be loaded and any side-effects it has (such as exporting) will happen. I suppose if you were feeling particularly crazy you could try something like this ... but if I saw code like that in production I'm afraid I'd have to shoot you.
In Section
Seekers of Perl Wisdom
|
|