in reply to Re^7: disable functions if module not installed
in thread disable functions if module not installed
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 };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^9: disable functions if module not installed
by Anonymous Monk on Nov 04, 2008 at 12:43 UTC | |
by ikegami (Patriarch) on Nov 04, 2008 at 13:07 UTC | |
by Anonymous Monk on Nov 04, 2008 at 14:20 UTC | |
by lepetitalbert (Abbot) on Nov 04, 2008 at 13:55 UTC |