full disclosure: The stuff in the BEGIN block is something I copied from another code (someone else's suggestion). It seemed to do what I wanted, so I haven't spent a lot of effort really understanding it.

Now, putting some effort to understand it, I believe what I am ending up doing is redirecting all the errors to foo.err, and all non-errors to foo.log. Which is ok. As quite a pleasant sideeffect of my ignorance, that _is_ what I want.

However -- I don't want to program to die as it seems to be doing. And, from your suggestion, it seems I will further insure that all warnings become dies. If, from what you say above, Mail::IMAPClient is just warning, why is the program die-ing?

Btw, per thor's suggestion, perl -c script.pl sends script.pl syntax OK to foo.err.

In the end -- I want there to be no die-ing at all, absolutely, unless a SIGINT is sent. In all cases other than a SIGINT, I want the error message written to foo.err and for the script to recover and merrily continue its way.

Since the above is a fair bit beyond my current understanding, I need some guidance on how to implement it.

Many thanks for your advice.


In reply to Re^2: Understanding compiletime vs. runtime by punkish
in thread Understanding compiletime vs. runtime by punkish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.