X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FClearcase%2FUCM%2FPvob.pm;h=0b3994939c218350c6f239255d0ea44211b0e76c;hb=7c11b11a13e503cebddd3343aa77f26c48d06fc7;hp=db5093a499d4bdb82271a471f988b524fe8bc095;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/lib/Clearcase/UCM/Pvob.pm b/lib/Clearcase/UCM/Pvob.pm index db5093a..0b39949 100644 --- a/lib/Clearcase/UCM/Pvob.pm +++ b/lib/Clearcase/UCM/Pvob.pm @@ -47,11 +47,14 @@ package Clearcase::UCM::Pvob; use strict; use warnings; -use Clearcase; -use Clearcase::UCM::Stream; +# Would be better represented by use parent "Clearcase::Vob" but we're +# working with old versions of Perl here... +use base 'Clearcase::Vob'; + +use Carp; sub new ($) { - my ($class, $name) = @_; + my ($class, $tag) = @_; =pod @@ -65,7 +68,7 @@ Parameters: =over -=item pvob name +=item name Name of pvob @@ -87,21 +90,65 @@ Returns: =cut - my $self = bless { - name => $name, + croak 'Clearcase::UCM::Pvob: Must specify pvob tag' unless $tag; + + $class = bless { + tag => $tag, }, $class; # bless - return $self; + $class->updateVobInfo; + + return $class; } # new -sub name () { +sub create (;$$$%) { + my ($self, $host, $vbs, $comment, %opts) = @_; + +=pod + +=head2 create + +Creates a pvob + +Parameters: + +=for html
+ +=over + +=item none + +=back + +=for html
+ +Returns: + +=for html
+ +=over + +=item none + +=back + +=for html
+ +=cut + + $opts{ucmproject} = undef; + + return $self->SUPER::create ($host, $vbs, $comment, %opts); +} # create + +sub tag() { my ($self) = @_; =pod -=head2 name +=head2 tag -Returns the name of the pvob +Returns the tag of the pvob Parameters: @@ -121,7 +168,7 @@ Returns: =over -=item pvob's name +=item tag =back @@ -129,7 +176,12 @@ Returns: =cut - return $self->{name}; + return $self->{tag}; +} # tag + +# Alias name to tag +sub name() { + goto &tag; } # name sub streams () { @@ -176,7 +228,7 @@ Returns: my @streams; push @streams, Clearcase::UCM::Stream->new ($_, $self->{name}) - foreach ($Clearcase::CC->output); + for ($Clearcase::CC->output); return @streams; } # streams @@ -187,9 +239,9 @@ Returns: =head2 ClearSCM Perl Modules -=for html

Clearcase

+=for html

Clearcase

-=for html

Clearcase::UCM::Baseline

+=for html

Clearcase::UCM::Baseline

=head1 INCOMPATABILITIES