Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Usually when I want to see if a module is present, I do this from the command-line:
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.perl -e "use Some::Module";
My thought is to put something in a do or eval. What would be the best way to handle this task?
Back to
Seekers of Perl Wisdom