The autodie documentation hints that it is possible to use it for other functions than those built-ins which it can handle by default, but there are no clear examples how to do that in it.
Specifically I would like to use it for the Imager module. A lot of the functions and methods of that can fail, and I would prefer if that wouldn't mean that my code will be littered with or die Imager|$image->errstr;
phrases all over.
Of course, if there's another way than using autodie to achieve that, I would be interested in that too.
use autodie
if they signal failure by one of the default behaviours listed in the introduction. But it still doesn't seem to work. Imager is mostly OO. Is there anything special I have to do to make autodie work with methods? – Gluck