AUTOLOAD is going into an infinite loop trying to reflect a constant, eating up the entire "C" stack. That's the memory you're running out of.
I'm curious as to what is being autloaded. I'd add a print statement to Image/Magick.pm to print out $constname.
The immediate cause of the problem is probably $! =~ /Invalid/ returning false when it is intended to return true. I'd add a print statement to Image/Magick.pm to print out (0+$!).":$!".
Of course, that's assuming your version of Image::Magick is anything like the latest one. You haven't provided any version info.
By the way,
eval { require Image::Magick };
my $is_Magick = $@ ? 0 : 1;
is simpler and safer when written as
my $is_Magick = eval { require Image::Magick; 1 };
In reply to Re^8: disable functions if module not installed
by ikegami
in thread disable functions if module not installed
by lepetitalbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |