ClearCase-CRDB
view release on metacpan or search on metacpan
exists it will be used unless a new the C<-do> flag is used. See also
the C<-db> and C<-fmt> flags.
The default save format is that of B<Data::Dumper>. It was chosen
because it results in a nicely indented, human-readable text format
file.
=head1 SELECTING DERIVED OBJECTS TO ANALYZE
If a C<-do> flag is given, the CRs are taken from the specified derived
object(s). Multiple DOs may be specified with multiple C<-do> flags
or as a comma-separated list. Alternatively, if the C<CRDB_DO>
environment variable exists, its value is used as if specified with
C<-do>.
If no DOs are specified directly, C<whouses> will look for stored DO
data in files specified with C<-db> or the C<CRDB_DB> EV. The format is
the same as above.
Failing that, C<whouses> will search for files named C<*.crdb> along a
path specified with C<-dir> or C<CRDB_PATH>, defaulting to the current
directory.
=head1 .AUDIT FILES
As a special case, derived objects matching the Perl regular expression
C</\.AUDIT/i> are ignored while traversing the recursive config spec.
These are presumed to be I<meta-DOs> by convention, which aren't part
of the production build per se but rather pseudo-targets whose only
purpose is to hold CRs referring back to all real deliverables. Thus
if you construct your Makefile to create a meta-DO, you might want to
name it C<.AUDIT> or C<.prog.AUDIT> or something.
=head1 ClearCase::CRDB
Most of the logic is actually in the C<ClearCase::CRDB> module; the
C<whouses> program is just a wrapper which uses the module. It's done
this way so ClearCase::CRDB can provide an API for other potential
tools which need to do CR analysis.
=head1 TRUE CODE ANALYSIS COMPARED
Whouses is somewhat different from "real" impact analysis products.
There are a number of such tools on the market, for example SNiFF+ from
WindRiver. Typically these work by parsing the source code into some
database representation which they can then analyze. It's a powerful
technique but entails some tradeoffs:
=head2 MINUSES
=over 4
=item *
A true code analysis tool must have knowledge of each programming
language in use. I.e. to add support for Java, a Java parser must be
added.
=item *
A corollary of the above is that it requires lot of work by expert
programmers. Thus the tools tend to be large, complex and expensive.
Note: there is also I<cscope> which is free, and maybe others. But as
the name implies I<cscope> is limited to C-like languages.
=item *
Another corollary is that the tool must track each advance
in each language, usually with significant lag time, and
may not be bug-for-bug compatible with the compiler.
=item *
Also, since analysis basically entails compiling the code, analysis of
a large code base can take a long time, potentially as long or longer
than actually building it.
=item *
If some part of the application is written in a language the tool
doesn't know (say Python or Visual Basic or Perl or an IDL), no
analysis of that area can take place.
=back
=head2 PLUSES
=over 4
=item *
The analysis can be as granular and as language-knowledgeable as its
developers can make it. If you change the signature of a C function, it
can tell you how many uses of that function, in what files and on what
lines, will need to change.
=item *
A code analysis tool may be tied to a set of languages but by the same
token it's NOT tied to a particular SCM or build system.
=back
The minuses above are not design flaws but inherent tradeoffs. For
true code impact analysis you must buy one of these tools and accept
the costs.
Whouses doesn't attempt code analysis per se. As noted above, true
code analysis programs are tied to language but not to an SCM system.
Whouses flips this around; it doesn't care about language but it only
works with build systems that use clearmake within a ClearCase VOB.
Whouses takes the I<config records> generated by clearmake, analyzes
them, and tells you which files depend on which other files according
to the CRs. Both techniques have fuzziness of different kinds: code
analysis predicts what the real compiler will do based on what the
analysis compiler found; divergence is possible. Whouses predicts what
the next build will do based on what the last build did. If changes
have taken place since, divergence is possible here too.
=head1 AUTHOR
David Boyce <dsbperl AT boyski.com>
=head1 COPYRIGHT
Copyright (c) 2000-2006 David Boyce. All rights reserved. This Perl
program is free software; you may redistribute and/or modify it under
( run in 0.576 second using v1.01-cache-2.11-cpan-97f6503c9c8 )