package VCP::Filter ; =head1 NAME VCP::Filter - A base class for filters =head1 SYNOPSIS use VCP::Filter; @ISA = qw( VCP::Filter ); ... =head1 DESCRIPTION A VPC::Filter is a VCP::Plugin that is placed between the source and the destination and allows the stream of revisions to be altered. For instance, the Map: option in vcp files is implemented by VCP::Filter::Map By default a filter is a pass-through. =cut $VERSION = 0.1 ; use strict ; use base "VCP::Plugin"; use fields ( 'DEST', ## Points to the next filter. ); sub dest { my VCP::Filter $self = shift; $self->{DEST} = shift if @_; return $self->{DEST}; } ############################################################################### =head1 SUBCLASSING This class uses the fields pragma, so you'll need to use base and possibly fields in any subclasses. =over =item last_rev_in_filebranch (passthru; see L) =cut sub last_rev_in_filebranch { shift->dest->last_rev_in_filebranch( @_ ); } =item metadata_only (passthru; see L) =cut sub metadata_only { shift->dest->metadata_only( @_ ); } =item sort_revs (passthru) =cut sub sort_revs { shift->dest->sort_revs( @_ ); } =item handle_header (passthru) =cut sub handle_header { shift->dest->handle_header( @_ ); } =item handle_rev (passthru) =cut sub handle_rev { shift->dest->handle_rev( @_ ); } =item handle_footer (passthru) =cut sub handle_footer { shift->dest->handle_footer( @_ ); } =back =head1 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 L. =head1 AUTHOR Barrie Slaymaker =cut 1