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

NAME

Text::Pipe::Tester - Common text filter API

SYNOPSIS

    use Text::Pipe::Tester;
    pipe_ok('List::Grep', [ code => sub { $_ % 2 } ],
        [ 1 .. 10 ], [ 1, 3, 5, 7, 9 ]);

DESCRIPTION

This is not a pipe segment; rather it exports a function that helps in testing pipes.

FUNCTIONS

pipe_ok
    pipe_ok($type, $options, $input, $expect, $name);

    pipe_ok('List::Grep', [ code => sub { $_ % 2 } ],
        [ 1 .. 10 ], [ 1, 3, 5, 7, 9 ]);

Constructs a pipe segment of type $type using options $options. It then sends the $input through the pipe and checks that the pipe returns $output; the check is done with is_deeply() for array references. For the test name, $name is used if given, or $type if no name has been specified.

Text::Pipe::Tester inherits from Exporter.

The superclass Exporter defines these methods and functions:

    as_heavy(), export(), export_fail(), export_ok_tags(), export_tags(),
    export_to_level(), import(), require_version()

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests 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/.

The development version lives at http://github.com/hanekomu/text-pipe/. Instead of sending patches, please fork this project using the standard git and github infrastructure.

AUTHORS

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

COPYRIGHT AND LICENSE

Copyright 2007-2009 by the authors.

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