Usually when I want to see if a module is present, I do this from the command-line:
perl -e "use Some::Module";
But now I need to test if a module is present from my program. I don't need to use the module. I just want to know if it's there.
Traversing @INC is out of the question. And I don't want to put something in a BEGIN block. In my program, sometimes I want to test if the module is there, and other times I don't test for its presence.
My thought is to put something in a do or eval. What would be the best way to handle this task?