http://qs1969.pair.com?node_id=11121375


in reply to Re^3: How to capture (intercept) output (warnings) of a module
in thread How to capture (intercept) output (warnings) of a module

> Perl generates warnings as ugly pop-up GUI modal boxes,

Isn't this dependent of the way Perl is started?

IOW did you have an associated DOS window or did you use wperl?

Your solution looks nice you might consider sending a patch request to the module's maintainer, such that users avoid using C.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^5: How to capture (intercept) output (warnings) of a module
by vr (Curate) on Sep 05, 2020 at 22:29 UTC
    IOW did you have an associated DOS window or did you use wperl?

    They are usual cmd.exe console window and perl.exe interpreter. Actually, GUI warnings for CLI tools was long standing issue for libtiff and Windows, e.g. link. Some defines were messed-up in C source, IIRC.

    However, I'm glad to stand corrected: as I'm checking now, in Strawberry Perl 5.28.2.1 (libtiff 4.0.7), there are "ugly GUI pop-ups" for warnings with libtiff, but in 5.30.2.1 (libtiff 4.0.10) there are "proper and nice" console messages. They finally fixed it, but not very long ago.

    consider sending a patch request to the module's maintainer

    when/if I have patch-quality solution, not proof-of-concept/cuff-scribbles code:) If only for a reason, that Inline::C should probably be converted to XS (which I have no experience with) to match Graphics::TIFF source