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.print 'the module exists' if(!system("perl -MSome::Module -e exit"));
In reply to Re: Testing for a module's presence
by DrHyde
in thread Testing for a module's presence
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |