---
name: "VCP::Filter"
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::Filter"
---

# VCP::Filter(3pm)

A base class for filters

## NAME

VCP::Filter - A base class for filters

## SYNOPSIS

```
   use VCP::Filter;
   @ISA = qw( VCP::Filter );
   ...
```

## 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.

## SUBCLASSING

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

- parse\_rules\_list

  Used in VCP::Filter::\*map and VCP::Filter::\*edit to parse lists of rules where every rule is a set of N "words".  The value of N is computed from the number of labels passed in and the labels are used when printing an error message:

  ```
      @rules = $self->parse_rules( $options, "Pattern", "Replacement" );
  ```

- filter\_name

  Returns the StudlyCaps version of the filter name.  By default, assumes a single work name and uses ucfirst on it.  Filters like StringEdit should overload this to be more creative and typgraphically appealing (heh).

- sort\_keys

  ```
     my @output_sort_order = $filter->sort_keys( @input_sort_order );
  ```

  Accepts a list of sort keys from the upstream filter and returns a list of sort keys representing the order that records will be emitted in.

  This is a pass-through by default, but VCP::Filter::sort and VCP::Filter::changesets return appropriate values.

- config\_file\_section\_as\_string

  - last\_rev\_in\_filebranch

  (passthru; see VCP::Dest)

- backfill

  (passthru; see VCP::Dest)

- handle\_header

  (passthru)

- rev\_count

  ```
      $self->SUPER::rev_count( @_ );
  ```

  passthru, see VCP::Dest.

- handle\_rev

  ```
      $self->SUPER::handle_rev( @_ );
  ```

  passthru, see VCP::Dest.

- skip\_rev

  ```
      $self->SUPER::skip_rev( @_ );
  ```

  passthru, see VCP::Dest

- handle\_footer

  ```
      $self->SUPER::handle_footer( @_ );
  ```

  passthru, see VCP::Dest

## 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\>
