ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved