http://qs321.pair.com?node_id=721235


in reply to Re^2: disable functions if module not installed
in thread disable functions if module not installed

almut your code gave me an out of memory too.

Weird.  Can you just plain load the module with use Image::Magick; (or require Image::Magick;)?  In case the machine (or user limit) doesn't provide sufficient memory to load the module (which in theory could be possible), I'd expect that you get "out of memory" either way.

An example of one of these block eval's ?
eval { require Image::Magick }; my $is_magick = $@ ? 0 : 1;