in reply to Re: Code struct map building?
in thread Code struct map building?

I tried to use Xref - but lot of scripts contain DB-operations, modifying or evel deleting information.

And, it is a bad idea to make triggers in hundred of scripts.

That's the reason i'm searching for a some magic tool which will show me subs callings without compilation :(

As for NaturalDocs - i also tried this - but as i said, the project is poorly PODed - and ND generates only a list of subs, which're DECLARED in scripts, NOT called. Sorry for my bad english :)

Replies are listed 'Best First'.
Re^3: Code struct map building?
by Perlbotics (Archbishop) on May 13, 2010 at 10:00 UTC

    Sorry for my bad text parsing capabilities this morning ;-)

    Well, I think such magic tool does not exist. Static structure can be Xref'ed but the run-time behavior depends on program-state, DB-information, time(?), etc. - something which might be documented by logging (e.g. for example sections of the docs and for analysis of program behavior). Beyond that, all tools rely on some commenting conventions to document the program semantics.

    What is the initial requirement anyhow? Do you want to compile a handbook (documentation) or do you want to chart a map of a given software package (orientation, job training)?

    In the long run, analyzing and (re-)documenting the code according to the conventions of the documentation tool you have chosen is the price to pay (aka tedious code maintenance work).

      >>What is the initial requirement anyhow? I need to chart a map :) For better orienting in that horror code when a new programmer comes or when committing a dumb patch that crashes a system. In this time we cannot afford to cover all the code with units and searching for a magic-tool to handle a bit that ancient horror:) Sadly, it is idea of PMs - but work is work:)

      -- For now - the only decision i have - is a bad-percentage analyzer built on regexes, they firstly remove some part of 'garbage' (use, require, vars, qq[] constructs etc) from code and suppose that remaining shit is a pool of sub calls. Of course it is a really bad solution - considering that sub-calls may be built dynamically, etc.

      Now i'm examining the Devel::Call* section of CPAN - maybe, i can recieve some kind stack of subcalls with -d param..:)