Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: B::Deparse and sub line numbers

by toolic (Bishop)
on Oct 29, 2012 at 14:21 UTC ( #1001363=note: print w/ replies, xml ) Need Help??


in reply to B::Deparse and sub line numbers

I do not know how to convince B::Deparse (or B::Xref for that matter) to give you the starting line number. What do you plan to do with that information once you have it? Maybe the ideas in Re: 'extract' subs from source code can help. Perhaps if you poke around PPI you can figure out how to get the line numbers.


Comment on Re: B::Deparse and sub line numbers
Re^2: B::Deparse and sub line numbers
by Anonymous Monk on Oct 29, 2012 at 20:43 UTC

    The goal is to use B::Deparse to check some properties of the code (kind of lint). The line numbers are needed to report precise information to the developer.

    FWIW, yes, I'm aware that B::Lint and Perl::Critic exist.

    I will look at PPI but this seems to be quite large...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2015-07-06 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls