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

NAME

IO::Plumbing::Hose - handles that plug into IO::Plumbing pipelines

SYNOPSIS

 use IO::Plumbing qw(plumb hose);

 # catch stderr from that command!
 my $cat = plumb("cat", output => hose);

 my $hose = hose;
 $cat->input($hose);
 $cat->execute();

 $hose->print "Hello, world\n";
 $hose->close;

 # or just grab the FH and wrangle it yourself
 my $handle = $hose->out_fh;

 print { $handle } "Hello, world";
 close($handle);

 # and read from it!
 print $cat->terminus->getline;  # "Hello, world\n";

DESCRIPTION

The hose is an interface to IO::Plumbing pipelines that effectively give you a "raw" unidirectional filehandle.

METHODS

$hose->gushing

A "gushing" hose is one that has something attached to its input. It gushes data.

$hose->sucking

A "sucking" hose is one that has something attached to its output. There is a process on the other end which is (hopefully) sucking data.

AUTHOR AND LICENCE

Copyright 2008, Sam Vilain. All Rights Reserved. This program is free software; you can use it and/or modify it under the same terms as Perl itself.