NAME

ClearCase::Config - ClearCase configuration settings


SYNOPSIS

  use ClearCase::Config;
  my $ct_path = clearcase_config 'CLEARTOOL';
  my ($cc_home, $cc_adm) = clearcase_config('ATRIA_HOME', 'ATRIA_ADM');
  my $clearbug_path = clearcase_progpath 'clearbug';
  my $ct_version = clearcase_version 'cleartool';


REQUIRES/IMPORTS

perl5.004


EXPORTS

clearcase_config, clearcase_progpath, clearcase_version, clearcase_patches


DESCRIPTION

ClearCase::Config contains all the environment and platform-specific configuration settings and attributes for the version of ClearCase running on the host system. Configuration settings may be obtained by invoking the clearcase_config function and passing it the name of one or more attributes.

The set of ClearCase attribute names currently supported are as follows:

ATRIA_HOME

Path to Atria home directory

ATRIA_ADM

Path to Atria administration directory

CLEARCASE_BIN

Path to ClearCase bin programs

CLEARCASE_ETC

Path to ClearCase etc programs

CLEARCASE_LOG

Path to ClearCase log file directory

CLEARCASE_XN_SFX

Extended naming symbol, usually ``@@''

CLEARCASE_VIEWROOT

View root directory, usually ``/view''

CLEARTOOL

The full pathname to the cleartool executable program

For the sake of convenience, the user may use the abbreviation CC_ anywhere that CLEARCASE_ appears above; and CT_ may be used anywhere that CLEARTOOL_ appears above. Any combination of uppercase and lowercase characters may be used but they will always be mapped to uppercase when computing the corresponding result.


<CODE>clearcase_config</CODE>

Queries ClearCase configuration attributes:

        my $scalar = clearcase_config($attr_name);
        my @array  = clearcase_config $attr1_name, $attr2_name;
        my %hash   = clearcase_config;

clearcase_config takes zero or more configuration attribute names. If no attribute names are given, then a hash is returned where the attribute names are keys in the hash and the values are the corresponding attribute settings. If one or more attribute names are given, then the value of each corresponding attribute setting is returned (which will result in an array if more than one name was given).


<CODE>clearcase_progpath</CODE>

Obtains the program path(s) to the named ClearCase program(s).

        my $progpath  = clearcase_progpath($progname);
        my @pathnames = clearcase_progpath $prog1_name, $prog2_name;

clearcase_progpath takes zero or more ClearCase program names. If no program names are given, then a hash is returned where the program names are keys in the hash and the values are the corresponding program paths. If one or more program names are given, then the pathname of each corresponding program is returned (which will result in an array if more than one name was given).


<CODE>clearcase_version</CODE>

Version information for ClearCase applications:

        my $ct_ver = clearcase_version 'cleartool';
        my $cc_ver = clearcase_version 'ClearCase';
        my ($cmk_ver, $mvfs_ver) = clearcase_version qw(clearmake MVFS);

clearcase_version takes the name of one or more ClearCase tools or products and returns the version identifier corresponding to each one. Valid tool/product names are:

ClearCase

installed version of ClearCase

MVFS

installed version of the Multi-Version File System

cleartool

installed version of cleartool command

multitool

installed version of multitool command (undefined if MultiSite is not installed)

xcleartool

installed version of xcleartool command

clearmake

installed version of clearmake command

abe

installed version of the abe command

view_server

installed version of view_server

vobrpc_server

installed version of vobrpc_server

db_server

installed version of db_server


<CODE>clearcase_patches</CODE>

Patch-level information for ClearCase installations:

        my $was_installed = clearcase_patches $patchname;
        my @installed_patches = clearcase_patches;

clearcase_patches takes the name of one or more ClearCase patch- names and returns a true value if each of the named patches has been installed on the system. If no arguments are given, then it returns a list of names of installed patches.


AUTHORS

Brad Appleton <brad@bradapp.net>


SEE ALSO

ClearCase::SiteConfig, ClearCase::OSUtil