Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Re (tilly) 4: passing subroutine arguments directly into a hash

by demerphq (Chancellor)
on Oct 21, 2001 at 15:45 UTC ( #120370=note: print w/replies, xml ) Need Help??

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

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)

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

  • Comment on Re: Re (tilly) 4: passing subroutine arguments directly into a hash

Replies are listed 'Best First'.
Re (tilly) 6: passing subroutine arguments directly into a hash
by tilly (Archbishop) on Oct 21, 2001 at 18:58 UTC
    Well I am hoping that few enough here know about CarpLevel to make telling them not to use it counter-productive. (Hey, what is that? Perhaps I can find a use for that even though tilly dislikes it...?)

    As for an explanation of what I dislike, try this email and this followup.

    As for finding your parents caller out of your own hierarchy, take a look in the current development snapshot at the implementation of Carp::Heavy. It solves that exact problem fairly efficiently.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://120370]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2022-01-28 16:16 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (73 votes). Check out past polls.