use Display;
use OSDep;
-sub new () {
- my ($class) = @_;
+sub new (;$) {
+ my ($class, $host, $region) = @_;
=pod
-=head2 new (tag)
+=head2 new (host)
Construct a new Clearcase Vobs object.
=over
-=item none
+=item host
+
+If host is specified then limit the vob list to only those vobs on that host. If
+host is not specified then all vobs are considered
=back
=cut
- my ($status, @output) = $Clearcase::CC->execute ("lsvob -short");
+ my $cmd = 'lsvob -short';
+ $cmd .= " -host $host" if $host;
+ $cmd .= " -region $region" if $region;
- return if $status;
+ my ($status, @output) = $Clearcase::CC->execute ($cmd);
- # Strip $VOBTAG_PREFIX
- foreach (@output) {
- if ($ARCHITECTURE eq 'windows' or $ARCHITECTURE eq 'cygwin') {
- s/\\//;
- } else {
- s/$Clearcase::VOBTAG_PREFIX//;
- } # if
- } # foreach
+ return if $status;
return bless {
vobs => \@output