3 =head1 NAME $RCSfile: Component.pm,v $
5 Object oriented interface to UCM Component
13 Andrew DeFaria <Andrew@ClearSCM.com>
21 Fri May 14 18:16:16 PDT 2010
25 $Date: 2011/11/15 02:00:58 $
31 Provides access to information about Clearcase Components.
33 my $stream = new Clearcase::UCM::Component($name, $pvob);
37 This module implements a UCM Component object
41 The following routines are exported:
45 package Clearcase::UCM::Component;
53 my ($class, $name, $pvob) = @_;
59 Construct a new Clearcase Component object.
63 =for html <blockquote>
77 =for html </blockquote>
81 =for html <blockquote>
85 =item Clearcase Component object
89 =for html </blockquote>
108 Returns the name of the component
112 =for html <blockquote>
120 =for html </blockquote>
124 =for html <blockquote>
132 =for html </blockquote>
136 return $self->{name};
146 Returns the pvob of the component
150 =for html <blockquote>
158 =for html </blockquote>
162 =for html <blockquote>
170 =for html </blockquote>
174 return $self->{pvob};
178 my ($self, $root, $comment) = @_;
184 Creates a new UCM Component Object
188 =for html <blockquote>
196 =for html </blockquote>
200 =for html <blockquote>
206 Status from cleartool
214 =for html </blockquote>
218 return (0, ()) if $self->exists;
220 $comment = Clearcase::_setComment $comment;
226 $self->{root} = $root;
228 $rootOpt = "-root $root";
230 carp "Root $root not found";
233 $self->{root} = undef;
238 return $Clearcase::CC->execute(
239 "mkcomp $comment $rootOpt " . $self->{name} . '@' . $self->{pvob}->tag
250 Removes UCM Component
254 =for html <blockquote>
260 =for html </blockquote>
264 =for html <blockquote>
270 Status from cleartool
278 =for html </blockquote>
282 return $Clearcase::CC->execute
283 ('rmcomp -f ' . $self->name . '@' . $self->pvob->tag);
293 Returns true if the component exists - false otherwise.
297 =for html <blockquote>
305 =for html </blockquote>
309 =for html <blockquote>
317 =for html </blockquote>
321 my ($status, @output) = $Clearcase::CC->execute(
322 'lscomp ' . $self->{name} . '@' . $self->{pvob}->name
332 =head2 ClearSCM Perl Modules
334 =for html <p><a href="/php/scm_man.php?file=lib/Clearcase.pm">Clearcase</a></p>
336 =for html <p><a href="/php/scm_man.php?file=lib/Clearcase/UCM/Baseline.pm">Clearcase::UCM::Baseline</a></p>
337 =for html <p><a href="/php/scm_man.php?file=lib/Clearcase/UCM/Project.pm">Clearcase::UCM::Project</a></p>
339 =head1 INCOMPATABILITIES
343 =head1 BUGS AND LIMITATIONS
345 There are no known bugs in this module.
347 Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
349 =head1 LICENSE AND COPYRIGHT
351 Copyright (c) 2007, ClearSCM, Inc. All rights reserved.