in reply to Re^2: Pixel setting oddity - Image:Magick
in thread Pixel setting oddity - Image:Magick

Thanks for the info on exception handling with Image::Magick!

And yes, merrymonk fails to check $@ after the eval, but there wouldn't have been a warning there since this actually works (as in this case the variables are actually in a double quote context). And on the topic of safety and error checking, it does look like the code is not run under strict and warnings ; which would have done nothing for this particular case, but are still very helpful safety nets.

  • Comment on Re^3: Pixel setting oddity - Image:Magick

Replies are listed 'Best First'.
Re^4: Pixel setting oddity - Image:Magick
by merrymonk (Hermit) on May 12, 2015 at 06:58 UTC
    Thank you for that explanation. Indeed is was the single quotes that were stopping it working. When I changed these to 4 double quotes all was well!
      Indeed is was the single quotes that were stopping it working. When I changed these to 4 double quotes all was well!

      It may work, but it still hides most, if not all errors, because you don't check $@ after eval and you don't check the return values from Image::Magick.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)