NAME Clearcase.pm 
Object oriented interface to Clearcase.
VERSION
- Author
-
Andrew DeFaria <Andrew@ClearSCM.com>
- Revision
-
Revision 1.19
- Created
-
Tue Dec 4 17:33:43 MST 2007
- Modified
-
Modifed 2010/08/24 00:17:40
SYNOPSIS
Provides access to global Clearcase information in an object oriented manner as well as an interface to cleartool.
# Access some compile time global settings:
display "View Drive: $Clearcase::view_drive";
display "Vob Tag Prefix: $Clearcase::vobtag_prefix";
# Access some run time global information through the default object
display "Client: $Clearcase::cc->client";
display "Region: $Clearcase::cc->region";
display "Registry host: $Clearcase::cc->registry_host";
# List all vobs using exec method of the default object";
my ($status, @vobs) = $Clearcase::cc->exec ("lsvob -s");
display $_ foreach (@vobs) if $status == 0;
DESCRIPTION
This module, and others below the Clearcase directory, implement an object oriented approach to Clearcase. In general Clearcase entities are made into objects that can be manipulated easily in Perl. This module is the main or global module. Contained herein are members and methods of a general or global nature. Also contained here is an IPC interface to cleartool such that cleartool runs in the background and commands are fed to it via the exec method. When making repeated calls to cleartool this can result in a substantial savings of time as most operating systems' fork/exec sequence is time consuming. Factors of 8 fold improvement have been measured.
Additionally a global variable, $cc, is implemented from this module such that you should not need to instantiate another one, though you could.
ROUTINES
The following routines are exported:
exec ($cmd)
Sends a command to the cleartool coprocess. If not running a cleartool coprocess is started and managed. The coprocess is implemented as a coprocess using IPC for communication that will exist until the object is destroyed. Stdin and stdout/stderr are therefore pipes and can be fed. The exec method feds the input pipe and returns status and output from the output pipe.
Using exec can speed up execution of repeative cleartool invocations substantially.
Parameters:
- $cmd
Cleartool command to execute.
Returns:
- $status
Status of the command last executed.
- @output
Array of output lines from the cleartool command execution.
new ()
Construct a new Clearcase object. Note there is already a default Clearcase object created named $cc. You should use that unless you have good reason to instantiate another Clearcase object.
Parameters:
- none
Returns:
- Clearcase object
client
Returns the client
Parameters:
- none
Returns:
- client
hardware_type
Returns the hardware_type
Parameters:
- none
Returns:
- hardware_type
license_host
Returns the license_host
Parameters:
- none
Returns:
- license_host
os
Returns the os
Parameters:
- none
Returns:
- os
region
Returns the region
Parameters:
- none
Returns:
- region
registry_host
Returns the registry_host
Parameters:
- none
Returns:
- client string
sitename
Returns the sitename
Parameters:
- none
Returns:
- sitename
version
Returns the version
Parameters:
- none
Returns:
- version
regions
Returns an array of regions in an array context or the number of regions in a scalar context
Parameters:
- none
Returns:
- array of regions or number of regions
verbose_level
Returns the verbose_level
Parameters:
- none
Returns:
- verbose_level
quiet
Sets verbose_level to quiet
Parameters:
- none
Returns:
- none
noisy
Sets verbose_level to noisy
Parameters:
- none
Returns:
- none
DEPENDENCIES
the IPC::Open3 manpage the IO::Select manpage the IO::Handle manpage
OSdep
Display
BUGS AND LIMITATIONS
There are no known bugs in this module
Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
LICENSE AND COPYRIGHT
Copyright (c) 2007, ClearSCM, Inc. All rights reserved.