---
name: "VCP::Revs"
section: "3pm"
platform: "linux"
package: "libvcp-perl"
version: "0.9-20050110-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/VCP::Revs"
---

# VCP::Revs(3pm)

A collection of VCP::Rev objects.

## NAME

VCP::Revs - A collection of VCP::Rev objects.

## SYNOPSIS

## DESCRIPTION

Right now, all revs are kept in memory, but we will enable storing them to disk and recovering them at some point so that we don't gobble huge tracts of RAM.

## METHODS

- new

  - add

  ```
     $revs->add( $rev ) ;
     $revs->add( $rev1, $rev2, ... ) ;
  ```

  Adds a revision or revisions to the collection.

  The ( name, rev\_id, branch\_id ) tuple must be unique, if a second rev is `"add()"`ed with the same values, an exception is thrown.

- get

  ```
     $rev = $revs->get( $id ) ;  ## return the rev with a given ID (or die())
  ```

- foreach

  ```
     $revs->foreach( sub { ... } );
  ```

  Apply a subroutine to each revision.

## SUBCLASSING

This class uses the fields pragma, so you'll need to use base and  possibly fields in any subclasses.

## COPYRIGHT

Copyright 2000, Perforce Software, Inc.  All Rights Reserved.

This module and the VCP package are licensed according to the terms given in the file LICENSE accompanying this distribution, a copy of which is included in vcp.

## AUTHOR

Barrie Slaymaker \<barries@slaysys.com\>
