Whooo. Well that told me. :-) Heh.

Good point about incrementing the carplevel instead of setting it, that would be a more clever way to go about it.

But im a little confused about your other comments. Maybe a post to meditations about what you've found out? I for one would appreciate it, especially as I have used carplevel a number of times with good results (or else I wouldnt have brought it up eh?). I understand from gschwern that there is a new version (written by you perhaps?) of Carp expected for 5.7 (or something) that corrects at least one bug in it that I know of (that being the fact that when overloading stringify in objects it will use this stringification instead of printing the underlying string value of the reference, which can cause big problems (sometimes deep recursion).

Nonetheless these are the type of things that I would really like to see a meditation on, so if you've got a few minutes... :-)

Its funny though but I was just working on some code that does something similar in Benchmark. Benchmark wants to know its original callers package so that it can run its benchmarks inside of that lexical space. As I have rewritten Benchmark in an OO form the routine is no longer at the same depth in the call stack, nor is it called in the same way, and it will be being from various subclasses with their own call stack issues, accordingly I had to hack the routine to ignore any packages in the Benchmark heirarchy. Wasn't my preferred solution and makes me think that maybe this type of 'figure out the outside caller' routine needs to be carefully coded in a reusable form. In fact on that line, I would be willing to put some effort into that if you have some code or ideas to contribute. ...oO(Hmm, maybe a meditation in of itself)

Yves
--
You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)


In reply to Re: Re (tilly) 4: passing subroutine arguments directly into a hash by demerphq
in thread passing subroutine arguments directly into a hash by c

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.