GT::IPC::Filter::Block - Implements stream based filtering for output streams.
use GT::IPC::Filter::Stream;
my $filter = new GT::IPC::Filter::Block( sub { my $chunk = shift ... } ); # -or- my $filter = new GT::IPC::Filter::Block( output => sub { my $chunk = shift; .. }, );
$filter->put(\$data);
$filter->flush;
Implements stream based filtering to an output code reference. Used mainly in GT::IPC::Run, the GT::IPC::Run manpage for details. Basically just a pass through to your code reference.
There are three methods (as with all filters in this class).
Takes either a single argument, which is a code reference to call output with, or a hash of options.
This is the code reference you would like called with each output.
This method takes a stream of data and passed it strait to your code reference. There is no buffering that happens here.
This method does nothing.
Scott Beck
Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. http://www.gossamer-threads.com/
Revision: $Id: Stream.pm,v 1.5 2006/05/26 21:56:30 brewt Exp $