There's no need to die within $SIG{__DIE__}. Log at whatever level you wish (error, fatal, whatever), and let perl die properly. It's already going to anyway.

How to fix your other problems that using $SIG{__DIE__} causes is another story entirely. I can't really see a way around it, as its working as intended. When you start noodling with that kind of stuff, where you selectively say "Oh, I didn't meant to actually die" I see this as a road to insanity. You're going to have to insert all of the logging statements anyway, unless your existing logging already kind of conforms to how Log::Log4perl does.

That said, the $^S may be a "temporary" (haha) solution until you can get the code base to conform to something a bit more sane, along with not using logdie in $SIG{__DIE__}.


In reply to Re: YAML, $SIG{__DIE__}, Log4perl, $^S, and eval{} by jellisii2
in thread [SOLVED] YAML, $SIG{__DIE__}, Log4perl, $^S, and eval{} by ateague

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.