Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Alright... it started off as a simple little problem. Just use somebody else's code and not have to worry about how things get done. Apparently I was oh so very wrong. The problem I have is that the engineer who wrote the code seems to have learned some new tricks and decided to put them where they don't belong, and to top it off left for vacation... hurray! hehe

Anyways... there are two types of code that I need to be able to break on and haven't come up with a good way to break in them. One is an eval, which using my deductive reasoning is probably stepable through but I haven't tried yet.

The other code I'm having trouble with though is that the engineer has used modules (not the problem) but has used references to the other module functions elsewhere to essentially do switches in his code. I'm not familiar with the more powerful stuff with debugging so I don't know how to break on something like:

&$function($arg1, $arg2);
I would just set a breakpoint on a line number but this is in another module and the path to get there is a little bizarre. I tried setting a breakpoint on "Module::function" but that didn't stop it. Which leads me to believe that either breakpoints don't work that way, or with my luck I've isolated a chunk of code that I thought did something that actually never gets called.

... This is slowly become a nightmare and I guess I need to learn some tricks for using the debugger, because to top it off I can't check out this code to put in print statements or anything... and as the final blow to making anything even understandable this is a client/server program, with both in the same code base and the code that is run for the client or the server is indistiguishable from the other.

So any monks out there have any words of wisdom or advice (other than quit your job... hehe) I'd really appreciate it. Thanks!!!

In reply to How to debug unknown dynamic code? by gaspodethewonderdog

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (5)
    As of 2020-02-22 07:12 GMT
    Find Nodes?
      Voting Booth?
      What numbers are you going to focus on primarily in 2020?

      Results (98 votes). Check out past polls.