Greetings, Masters.
I have an oddball module (Graphics::TIFF, but that's not really relevant; my question is not about the module itself). It is emitting warning messages to the console, such as:
TIFFReadDirectory: Warning, Unknown field with tag 37724 (0x935c) encountered.
The method that I am calling (
my $count = $tiff->NumberOfDirectories();) succeeds, and the method returns the correct value for
$count (NumberOfDirectories), while also emitting that warning message to the console. It does not return the warning message (it returns the number of directories, as it should).
The module is not setting $! or anything (return code is zero, since it counted the directories) - these are just warning messages. But the module doesn't provide any method for me to
access these warnings, other than just dumping my program output to a file (which I would then have to subsequently parse through - groan).
I'm running my job in batch - I want to capture these warnings to a log database. So (I think) I need to somehow tell my program to watch STDOUT/STDERR from this module and capture any messages.
How do I do that, Masters?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.