Something like this should work... if ( eval "require Image::Size" ) { Image::Size->import(); print "The module is installed!"; } else { print "It's not installed!"; }
Rob -----Original Message----- From: Dennis Senftleben [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 12:03 PM To: [EMAIL PROTECTED] Subject: How to test if a module is installed ? Hi ! My perlscript uses the Image::Size module. It works fine if it is installed, but if not I get a compilation error msg. How can I test with perl if it is installed on my system ? Is there something like if ( -e Image::Size ) { use Image::Size ;} else { print(" module not installed");} Dennis icq: #28395132 --------------------------------------- This message was sent by Postaci Webmail. See www.trlinux.com for details. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]