I've got a doozy of an application I've been working with, and it's heart and soul revolves around it's ability to evaluate Perl code which is written my the user (me) and then executed within an embedded interpreter.

I don't want to plug their product, and I'll try not to unnecessarily berate it either, but it may help my fellow monks to know that it is OpenService NerveCenter, formerly sold by VERITAS. (I'll take no offense at all if the mods wish me to delete this paragraph)

I believe the code it evaluates is (usually) done so as if they were pieces of a long-running program - data in package scoped variables is available to all code after declaration, while lexically-scoped (my) variables *seem* to disappear after a chunk of code is evaluated.

I dare not use strict or warnings, because there appears to be a lot going on behind the scenes and I have no clue how it may affect things.

The problem I am facing is in trying to debug this beast. I'll spare the saga of what brings me here instead of the vendor's tech support, but suffice to say something makes this thing unstable as all hell and I want to know if there's anything in my Perl code that may be doing it, especially something I can work around. Being able to see run-time errors in a log file may be the key.

I can has halp plz? :)

Update:

At the recommendation of sundialsvc4, I'm trying to explain the 'saga' in another node below, posted anonymously... it's long winded and mostly irrelevant, but some monks may be interested...

Update 2:

Thanks for all your help. Because of the advice in your responses, I was able to get some info out of this beast at the time of a malfunction. There's still no evidence it's my code, but that may be a good thing! The asterisk on RESOLVED is simply because I'm still open to learning new techniques for debugging this application :)

In reply to [RESOLVED*] Logging run-time warnings from an embedded perl interpreter by Hercynium

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.