eval { use Image::Magick };
I'm guessing the purpose of this line is to defer the overhead of loading Image::Magick until you actually need it. I don't think this line of code successfully achieves that though.
One of the differences between 'use' and 'require' is that use happens at compile-time while require happens at run-time. So Image::Magick will be loaded as soon as that line is compiled - regardless of the fact that it's in an eval block. You could change it to:
eval "use Image::Magick";Which would work because the compiler wouldn't even see it. Or you could simply say:
require Image::MagickThe fact that you're using eval but not checking $@ was a bit of a red flag.
In reply to Re: Image2HTML
by grantm
in thread Image2HTML
by Chady
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |