ClearCase::CRDB is a Perl class for ClearCase config-record analysis.
my $crdb = ClearCase::CRDB->new(@ARGV); # Initialize object
$crdb->check; # Do a CR sanity check
$crdb->catcr; # Analyze the recursive CR
$crdb->store($filename); # Dump CR to $filename
A ClearCase::CRDB object represents the (potentially recursive) configuration record (hereafter CR) of a set of derived objects (hereafter DOs). It provides methods for easy extraction of parts of the CR such as the build script, MVFS files used in the creation of a given DO, make macros employed, etc. This is the same data available from ClearCase in raw textual form via cleartool catcr; it's just broken down for easier access and analysis.
An example of what can be done with ClearCase::CRDB is the provided whouses script which, given a particular DO, can show recursively which files it depends on or which files depend on it.
Since recursively deriving a CR database can be a slow process for large build systems and can burden the VOB database, the methods ClearCase::CRDB->store and ClearCase::CRDB->load are provided. These allow the derived CR data to be stored in its processed form to a persistent storage such as a flat file or database and re-loaded from there. For example, this data might be derived once per day as part of a nightly build process and would then be available for use during the day without causing additional VOB load.
The provided ClearCase::CRDB->store and ClearCase::CRDB->load methods save to a flat file in human-readable text format. Different formats may be used by subclassing these two methods. An example subclass ClearCase::CRDB::Storable is provided; this uses the Perl module Storable which is a binary format. If you wanted to store to a relational database this is how you'd do it, using Perl's DBI modules.