The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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.

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

Sets the list of revs.

get
   @revs = $revs->get ;

Gets the list of revs.

sort
   # Using a custom sort function:
   $revs->sort( sub { my ( $rev_a, $rev_b ) = @_ ; ... } ) ;

Note: Don't use $a and $b in your sort function. They're package globals and that's not your package. See "rev_cmp_sub" in VCP::Dest for more details.

shift
   while ( $r = $revs->shift ) {
      ...
   }

Call "sort" before calling this :-).

as_array_ref

Returns an ARRAY ref of all revs.

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>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 167:

You forgot a '=back' before '=head1'