NAME Element.pm
Object oriented interface to Clearcase Elements
VERSION
- Author
-
Andrew DeFaria <Andrew@DeFaria.com>
- Revision
-
$Revision: 1.18 $
- Created
-
Thu Dec 29 12:07:59 PST 2005
- Modified
-
$Date: 2011/11/16 19:46:13 $
SYNOPSIS
Provides access to information about Clearcase Elements.
my $element = new Clearcase::Element (pname => "element");
print "Element:\t" . $element->pname . "\n";
print "Version:\t" . $element->version . "\n";
print "Pred:\t\t" . $element->pred . "\n";
print "Activities:\n";
if (my %activities = $element->activities) {
print "\t\t$_: $activities{$_}\n" foreach (keys %activities);
} else {
print "\t\tNone\n";
} # if
print "Attributes:\n";
if (my %attributes = $element->attributes) {
print "\t\t$_=$attributes{$_}\n" foreach (keys %attributes);
} else {
print"\t\tNone\n";
} # if
print "Hyperlinks:\n";
if (my @hyperlinks = $element->hyperlinks) {
print "\t\t$_\n" foreach (@hyperlinks);
} else {
print "\t\tNone\n";
} # if
print "Comments:\n";
if ($element->comments) {
print "\t\t" . $element->comments . "\n";
} else {
print "\t\tNone\n";
} # if
print "Create_date:\t" . $element->create_date . "\n";
print "User:\t\t" . $element->user . "\n";
print "Group:\t\t" . $element->group . "\n";
print "User_mode:\t" . $element->user_mode . "\n";
print "Group_mode:\t" . $element->group_mode . "\n";
print "Other_mode:\t" . $element->other_mode . "\n";
print "Mode:\t\t" . $element->mode . "\n";
print "Labels:\n";
if (my @labels = $element->labels) {
print "\t\t$_\n" foreach (@labels);
} else {
print "\t\tNone\n";
} # if
print "Rule:\t\t" . $element->rule . "\n";
print "Xname:\t\t" . $element->xname . "\n";
DESCRIPTION
This module implements a Clearcase Element object.
ROUTINES
The following routines are exported:
collapseOverExtendedVersionPathname
This utility function will collapse an "over extended" version pathname. These over extended pathnames can occur when we are not operating in the UCM view from which the version was generated. Clearcase gives us enormous,technically correct but hard to read, view/vob extended path names. Here's an example (broken by lines for readability):
/vob/component/branch1@@/main/branch1_Integration/1/src/main/branch1_
/2/com/main/branch1_Integration/2/company/main/branch1_Integration/2/
ManagerPlatform/main/branch1_Integration/2/nma/main/
branch1_Integration/devbranch_17/1/common/main/devbranch_17/3/exception/
main/mainline/devbranch_r17/1/Exception.java/main/mainline/1
We want this to read:
element: /vob/component/src/com/company/ManagerPlatform/nma/
common/exception/Exception.java
version: /main/mainline/1
Parameters:
Returns:
new
Construct a new Clearcase Element object.
Parameters:
Returns:
activities
Returns a hash of activity name/value pairs
Parameters:
- none
Returns:
attributes
Returns a hash of attribute name/value pairs
Parameters:
- none
Returns:
comments
Returns the comments associated with the current version element.
Parameters:
- none
Returns:
- comment
create_date
Returns the date of creation of the element.
Parameters:
- none
Returns:
group
Returns the group of the element.
Parameters:
- none
Returns:
- group
group_mode
Returns the group mode of the element
Parameters:
- none
Returns:
hyperlinks
Returns a hash of hyperlink name/value pairs
Parameters:
- none
Returns:
labels
Returns an array of labels
Parameters:
- none
Returns:
mode
Returns the numeric mode representing the element's access mode
Parameters:
- none
Returns:
other_mode
Returns the mode for other for the element.
Parameters:
- none
Returns:
pname
Returns the pname of the element.
Parameters:
- none
Returns:
- pname
pred
Returns the predecessor version of this element
Parameters:
- none
Returns:
rule
Returns the config spec rule that selected this element's version.
Parameters:
- none
Returns:
- rule
type
Returns the element's type
Parameters:
- none
Returns:
objkind
Returns the element's object kind
Parameters:
- none
Returns:
oid
Returns the element's OID
Parameters:
- none
Returns:
user
Returns the username of the owner of this element.
Parameters:
- none
Returns:
user_mode
Returns the mode for the user for the element.
Parameters:
- none
Returns:
version
Returns this element's version
Parameters:
- none
Returns:
- version
xname
Returns the view extended path name (xname) of an element version.
Parameters:
- none
Returns:
- xname
mkelem
Returns creates a new element
Parameters:
- Comment
-
Creation comment. Default -nc.
Returns:
checkout
Checks out the element
Parameters:
- comment
-
Checkout comment. Default -nc.
Returns:
checkin
Checks in the element
Parameters:
- comment
-
Check in comment. Default -nc.
Returns:
DEPENDENCIES
Modules
INCOMPATABILITIES
None
BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Andrew DeFaria <Andrew@DeFaria.com>.
COPYRIGHT AND LICENSE
Copyright (C) 2020 by Andrew@DeFaria.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.38.0 or, at your option, any later version of Perl 5 you may have available.