I'm not sure I understand. Carp breaks? Or Carp doesn't return what you expect?

Disclaimer: I've never tried anything even remotely like this...

As far as I can tell from your example and other examples found on google, where you've put "/dev/null" is where others normally put the name of the calling file, which would be in keeping with the results returned by caller(). I could make an assumption (which is probably wrong), that my_argv as you've used it, would contain the package, file, line that would be returned by caller (and carp). Package defaulting to 'main' (as it's blank) and line defaulting to zero (as it's blank as well). Since my_argv is passed as a pointer, it may be that you can change the values before each call to call_method() in your C code, like say set the line number to the line number in your C code before making the call. Or it may be that the my_argv values are copied by perl_parse() and you can't change them later. But this is all purely speculation, take it for what it's worth.

In reply to Re^3: Embedding: load_module(), stack frames and Carp by ruzam
in thread Embedding: load_module(), stack frames and Carp by sjfloat

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.