in reply to Testing for a module's presence

You could use Module::Locate for the job e.g
use Module::Locate 'locate'; print "Couldn't find Some::Module" unless locate 'Some::Module';
This code will return the path to the module if it is on the system or false if not. Also it doesn't load the module it just checks for its presence in the same manner that perl's require does.


Replies are listed 'Best First'.
CPAN knows how
by adamk (Chaplain) on Feb 06, 2005 at 06:06 UTC