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

NAME

App::Muter::Backend - App::Muter::Backend - a backend for muter

VERSION

version 0.001000

METHODS

$class->new($args, %opts)

Create a new backend.

$args is an arrayref of arguments provided to the chain. Currently only the first argument is considered, and it will typically be a variant of the main algorithm (e.g. lower for lowercase).

%opts is a set of additional parameters. The transform value is set to either encode for encoding or decode for decoding.

Returns the new object.

$class->metadata

Get metadata about this class.

Returns a hashref containing the metadata about this backend. The following keys are defined:

name

The name of this backend. This should be a lowercase string and is the identifier used in the chain.

args

A hashref mapping possible arguments to the transform to a human-readable description.

$self->process($data)

Process a chunk of data. Returns the processed chunk. Note that for buffering reasons, the data returned may be larger or smaller than the original data passed in.

$self->final($data)

Process the final chunk of data. Returns the processed chunk. Note that for buffering reasons, the data returned may be larger or smaller than the original data passed in.

Calling this function is obligatory. If all actual data has been passed to the process function, this function can simply be called with the empty string.

AUTHOR

brian m. carlson <sandals@crustytoothpaste.net>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2016–2017 by brian m. carlson.

This is free software, licensed under:

  The MIT (X11) License