Re: Every.pm on CPAN
by Ben Morrow other posts by this author
Jul 18 2008 4:48PM messages near this date
Re: Every.pm on CPAN
|
Re: Every.pm on CPAN
Quoth tzz@[...].com (Ted Zlatanov):
>
> Agreed, and I don't want to, I'm asking for a way to tell where on a
> line the function was called so I can avoid such hacks.
Something like this
IV
callsite()
INIT:
#if PERL_VERSION > 8
register PERL_CONTEXT *cx;
#endif
CODE:
#if PERL_VERSION > 8
cx = &cxstack[cxstack_ix];
RETVAL = (IV)(cx-> blk_sub.retop);
#else
RETVAL = (IV)(PL_retstack[PL_retstack_ix - 1]);
#endif
OUTPUT:
RETVAL
might help... it returns the address of the op the current sub will
return to, which should be as unique as you need.
Ben
--
I touch the fire and it freezes me, [ben@[...].uk]
I look into it and it's black.
Why can't I feel? My skin should crack and peel---
I want the fire back... BtVS, 'Once More With Feeling'
Thread:
Ted Zlatanov
Abigail
Ted Zlatanov
Ben Morrow
Roland Giersig
David Nicol
Ted Zlatanov
Ted Zlatanov
David Nicol
Ben Morrow
Ted Zlatanov
Chromatic
Aristotle Pagaltzis
Nicholas Clark
Yitzchak Scott-Thoennes
David Nicol
Ted Zlatanov
Abigail
Ted Zlatanov
Abigail
David Nicol
Ted Zlatanov
Aristotle Pagaltzis
Ted Zlatanov
David Cantrell
David Nicol
Eric Wilhelm
David Nicol
Ben Morrow
Aristotle Pagaltzis
Paul Johnson
David Nicol
Eric Brine
Gisle Aas
David Nicol
Nicholas Clark
|