Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

convoluted question regarding visualization of perl code

by jfroebe (Parson)
on Mar 11, 2005 at 03:56 UTC ( [id://438524]=perlquestion: print w/replies, xml ) Need Help??

jfroebe has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

Is there some script or module that would allow me to produce a flow chart like visual representation of perl code? Maybe even at a high level?

The reason why I ask is that for me to really understand something I end up drawing out the relationships as well as the basic flow of a script. I know this can be done quite easily with database schemas, so I'm pretty certain someone has atleast created a partially working 'visualizer' for perl code.

I'm in NYC for work and my brain shut off about an hour ago so I'm not finding squat on it. personally, I think it is just hiding on me ;)

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

  • Comment on convoluted question regarding visualization of perl code

Replies are listed 'Best First'.
Re: convoluted question regarding visualization of perl code
by kvale (Monsignor) on Mar 11, 2005 at 04:19 UTC
    There was a talk by Leon Brocard about graphing perl program structure. Bsaically he used Devel::DProf in combination with the GraphViz module to produce pretty subroutine call graphs. He used Devel::SmallProf to produce line-level graphs. I don't know if he ever released the software, but knowing a solution exists with the aforementioned modules should be a good start.

    -Mark

      Thanks Mark!! I know how to do it now :)

      I'm now laughing like a mad scientist with a very bad caffeine addiction!

      Update: The presentation given in the link was enough for me to start on it. When I get it to a semi working stage I will post it in the code section

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Re: convoluted question regarding visualization of perl code
by cowboy (Friar) on Mar 11, 2005 at 06:55 UTC
    You say you have the solution, please, share it, I am sure many of us would like to hear about it. Some for practical reasons, others, for theoretical, but all for good. :)
Re: convoluted question regarding visualization of perl code
by tphyahoo (Vicar) on Mar 11, 2005 at 10:09 UTC
    Not a perl answer.

    But it sounds like you want something similar to what McCabe software has for java.

    The above page doesn't mention perl support, but here perl is mentioned, kind of obscurely, so maybe they they have something if you want to ask.

    I actually set up a demo with them once (for java), and it was really cool.

    Horribly expensive though. No pricing info on their web page, first they give the demo then the shocking numbers. But that was over five years ago, maybe things have changed.

    Since you asked about visualizing perl code, I'm guessing you inherited some code and want to get a handle or broad overview on it. I asked for and got some help on a (I think) related problem here at grepping out global vars?.

Re: convoluted question regarding visualization of perl code
by bageler (Hermit) on Mar 13, 2005 at 18:48 UTC

      Looks like I won't have to do as much as I thought!!! Thanks bageler!

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://438524]
Approved by kvale
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-16 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found