mauzo on github
https://github.com/mauzo submitted a patch for this that has just been merged which I think addresses this problem. Please double check. If things work out, I guess we can put out another release.
Lastly, I confess I didn't see this until mauzo had mentioned it. I don't automatically get bug reports from RT, and even if I did I find the mechanism more cumbersome than opening up a github issue:
https://github.com/rocky/Perl-Devel-Callsite/issues/new
If folks know the best way to let folks know not to use RT in favor of github issues or a way to better link the two, I'd be grateful.
On Sun Nov 03 15:42:12 2013, TOBYINK wrote:
Show quoted text> On 2013-11-03T12:01:00Z, TEODOR wrote:
> > I can't see how that's useful, since the whole idea is to get a
> > unique
> > callsite ID for the call location. Can you give an example?
>
> Here's what I'd want to print the same address twice:
>
> perl -MDevel::Callsite -le'sub foo { print callsite(1); }; sub bar {
> foo(); foo(); } bar();'
>
> Whereas this, would act the same as the current callsite():
>
> perl -MDevel::Callsite -le'sub foo { print callsite(0); }; sub bar {
> foo(); foo(); } bar();'
>
> I need this because I want to use callsite() from a function which is
> called through several layers of wrapper subs.
>
> In this function I need to print a warning, but if the function is
> called repeatedly from the same site, I'd like to only warn the first
> time. I already calculate how many layers of wrapper to eliminate in
> order to report the right line numbers; I'd like to also pass that
> number to callsite() in order to find the call site ignoring the
> wrapper functions.