laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Normally I'd recommend manipulating __WARN__ and __DIE__ in %SIG
But since this is a wrapper around a C lib you might really need to temporarily redirect STDERR and STDOUT to a variable. See description in https://perldoc.pl/functions/open.html#Duping-filehandles if wanna do it without extra capture module. Furthermore does the module https://metacpan.org/pod/Graphics::TIFF claim that The Perl bindings follow the C API very closely, and the C reference documentation should be considered the canonical source. And http://www.libtiff.org/libtiff.html#Errors offers hooks to handle errors. So you should check if it's an undocumented feature of the Perl wrapper. HTH
Cheers Rolf In reply to Re: How to capture (intercept) output (warnings) of a module
by LanX
|
|