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

NAME

Text::Pipe::Base - Base class for text pipe segments

SYNOPSIS

    package Text::Pipe::My::Segment;

    use base 'Text::Pipe::Base'

    sub filter { ... }

DESCRIPTION

This is the base class for all text pipe segments. It implements basic behaviour that specific text pipe segments will want to override.

It also overloads the | operator so you can create stackable pipes like this:

    my $stackable_pipe = $pipe1 | $pipe2 | $pipe3;

Text::Pipe::Base inherits from Class::Accessor::Complex.

METHODS

new
    Text::Pipe::Base->new;
    Text::Pipe::Base->new(%args);

A constructor. It can take named arguments which are used to set the object's accessors.

filter_single

Filters a single string. In this base class this method just returns the input string unaltered.

filter

Can filter a single string or an reference to an array of strings. Each string is filtered using filter_single().

TAGS

If you talk about this module in blogs, on del.icio.us or anywhere else, please use the textpipe tag.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to <bug-text-pipe@rt.cpan.org>, or through the web interface at http://rt.cpan.org.

INSTALLATION

See perlmodinstall for information and options on installing Perl modules.

AVAILABILITY

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.

AUTHOR

Marcel Grünauer, <marcel@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007 by Marcel Grünauer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.