Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: Identifying a location with finer granularity than a line number (B::Concise)

by tye (Cardinal)
on Aug 15, 2012 at 06:11 UTC ( #987505=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Identifying a location with finer granularity than a line number (-MO=)
in thread Identifying a location with finer granularity than a line number

currently B::Terse and B::Concise parse the source text a new rather than have the ability to work on an in place node structure

I'm pretty sure you are precisely wrong on that point.

The B::Concise man page shows how to call the compile() method which does not take Perl source code (despite what the name "compile" might imply) but only a list of subroutine names or CODE refs. So it seems pretty clear that the module walks the opnode tree of your existing interpreter instance for Perl code that you have already compiled. Looking at the source code of B::Concise and B confirms this.

- tye        


Comment on Re^5: Identifying a location with finer granularity than a line number (B::Concise)
Re^6: Identifying a location with finer granularity than a line number (B::Concise)
by rockyb (Beadle) on Aug 15, 2012 at 06:21 UTC

    Ah, yes. Ok. So now how can I get a CODE ref from the call stack of a running Perl program?

    Independent of this particular problem, it's something I'd want to be able to do. I can't remember the details now but I recall needing a CODE ref (as opposed to a in "context") in conjunction with the module Scope::Upper

      For the record, recent versions — 0.08 and later — of Devel::Callsite gives the OP address that you are stopped at or of a caller in the call stack. (The address of the OP is a child of the COP instruction, but this isn't an important distinction.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-08-23 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls