VCP::Filter(3pm)

VCP::Filter3pm

A base class for filters

Usage

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

Overview

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

Releases

2 releases since Debian 3.1 (Sarge); the text changed 1 time.

  1. 3.1
  2. 4.0

Author

Barrie Slaymaker <[email protected]>

From libvcp-perl 0.9-20050110-1 in Debian 4.0 (Etch). Parsed by carta from the page's man source.