NAME

GT::IPC::Filter::Block - Implements stream based filtering for output streams.


SYNOPSIS

    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;


DESCRIPTION

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.


METHODS

There are three methods (as with all filters in this class).

new

Takes either a single argument, which is a code reference to call output with, or a hash of options.

output

This is the code reference you would like called with each output.

put

This method takes a stream of data and passed it strait to your code reference. There is no buffering that happens here.

flush

This method does nothing.


SEE ALSO

See the GT::IPC::Run manpage.


MAINTAINER

Scott Beck


COPYRIGHT

Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. http://www.gossamer-threads.com/


VERSION

Revision: $Id: Stream.pm,v 1.5 2006/05/26 21:56:30 brewt Exp $