X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FClearcase%2FUCM%2FPvob.pm;h=86629c144d45361f41c23be976e1921eac23e9f6;hb=0ef66cf800a95592cb108547021905cc0009b913;hp=00fe5e188ff37f99adbf4c28d8e85aee5c4c16e8;hpb=81cbd130706633b1c19ff59371c2ef61d80c562b;p=clearscm.git diff --git a/lib/Clearcase/UCM/Pvob.pm b/lib/Clearcase/UCM/Pvob.pm index 00fe5e1..86629c1 100644 --- a/lib/Clearcase/UCM/Pvob.pm +++ b/lib/Clearcase/UCM/Pvob.pm @@ -47,11 +47,12 @@ package Clearcase::UCM::Pvob; use strict; use warnings; -use Clearcase; -use Clearcase::UCM::Stream; +use parent 'Clearcase::Vob'; + +use Carp; sub new ($) { - my ($class, $name) = @_; + my ($class, $tag) = @_; =pod @@ -65,7 +66,7 @@ Parameters: =over -=item pvob name +=item name Name of pvob @@ -87,21 +88,26 @@ Returns: =cut - my $self = bless { - name => $name, + croak 'Clearcase::UCM::Pvob: Must specify pvob tag' unless $tag; + + $class = bless { + tag => $tag, + ucmproject => 1, }, $class; # bless - return $self; + $class->updateVobInfo; + + return $class; } # new -sub name () { +sub tag() { my ($self) = @_; =pod -=head2 name +=head2 tag -Returns the name of the pvob +Returns the tag of the pvob Parameters: @@ -121,7 +127,7 @@ Returns: =over -=item pvob's name +=item tag =back @@ -129,7 +135,12 @@ Returns: =cut - return $self->{name}; + return $self->{tag}; +} # tag + +# Alias name to tag +sub name() { + goto &tag; } # name sub streams () { @@ -176,7 +187,7 @@ Returns: my @streams; push @streams, Clearcase::UCM::Stream->new ($_, $self->{name}) - foreach ($Clearcase::CC->output); + for ($Clearcase::CC->output); return @streams; } # streams