View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
David Boyce > ClearCase-CRDB > ClearCase::CRDB



Annotate this POD

View/Report Bugs
Module Version: 0.15   Source  


ClearCase::CRDB - 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.


Use ClearCase::CRDB->new to construct a CRDB object. If @ARGV is passed in, the constructor will automatically parse certain standard flags from @ARGV and use them to initialize the object. See the usage method for details.


Following is a brief description of each supported method. Examples are given for all methods that take parameters; if no example is given, usage may be assumed to look like:

    my $result = $obj->method;

Also, if the return value is described in plural terms it may be assumed that the method returns a list.

There are also some undocumented methods in the source. This is deliberate; they're experimental.


David Boyce <dsbperl AT>


Copyright (c) 2000-2005 David Boyce. All rights reserved. This Perl program is free software; you may redistribute and/or modify it under the same terms as Perl itself.


This is currently ALPHA code and thus I reserve the right to change the API incompatibly. At some point I'll bump the version suitably and remove this warning, which will constitute an (almost) ironclad promise to leave the interface alone.


This module has been at least slightly tested, at various points in its lifecycle, on almost all CC platforms including Solaris 2.6-8, HP-UX 10 and 11, and Windows NT4 and Win2K SP2 using perl 5.004_04 through 5.6.1 and CC4.1 through 5.0. However, I tend to use the latest of everything (CC5.0, Solaris8, Win2KSP2, Perl5.6.1 at this writing) and cannot regression-test with anything earlier. Also, note that I rarely use this on Windows so it may be buggier there.


NOTE: A bug in CC 5.0 causes CRDB's "make test" to dump core. This bug is in clearmake, not CRDB, and in any case affects only its test suite. The first CC 5.0 patch contains a fix, so you probably don't want to use CC 5.0 unpatched. If you do, ignore the core dump in the test suite and force the install anyway.

Please send bug reports or patches to the address above.


perl(1), ct+config_record(1), clearmake(1) et al

syntax highlighting: