Text::Pipe::Tester - Common text filter API
use Text::Pipe::Tester; pipe_ok('List::Grep', [ code => sub { $_ % 2 } ], [ 1 .. 10 ], [ 1, 3, 5, 7, 9 ]);
This is not a pipe segment; rather it exports a function that helps in testing pipes.
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.
$type
$options
$input
$output
is_deeply()
$name
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()
No bugs have been reported.
Please report any bugs or feature requests through the web interface at http://rt.cpan.org.
See perlmodinstall for information and options on installing Perl modules.
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.
Marcel Grünauer, <marcel@cpan.org>
<marcel@cpan.org>
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.
To install Text::Pipe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Pipe
CPAN shell
perl -MCPAN -e shell install Text::Pipe
For more information on module installation, please visit the detailed CPAN module installation guide.