Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-20 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found