Thanks all replicants:

Firstly, I apologize; I seem to have lied in my original post. I am not using 'warn' but rather 'carp' in the perl module. The 'warn' function honors the '#line <NUM>' comment (and BrowserUk's '#file <NAME>' as well) just fine.

Of course, being a DRY kinda guy, I'd rather not have to keep these directives synced with the *actual* line number and name. I tried putting a:

# line 1

at the top of the page, but apparently, intervening comment lines are not counted, so that the value it winds up using is a bit higher up in the file that it really is. At any rate, I'm using Carp in the module and it does *not* honor these directives.

What I was really fishing for was a way to use load_module(), allowing the interpreter to search for and load the module in the expected way (have cake) and yet benefit from having used perl_parse()(eat cake). I poked around in the interpreter code a little, wondering if there was a clean way to, perhaps, steal the file name that load_module() determined, but was not obvious to me how I might do that. [please do pardon my parenthetical americanisms].

Another long shot I tried was to push the arguments to the function of interest onto the stack and then call eval_pv() with *no* parameters, hoping the function would find it's parms waiting for it on the stack. But this did not produce the desired effect.


In reply to Re^2: Embed: Using load_module by sjfloat
in thread Embed: Using load_module 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.