Jakob Voß > RDF-Flow > RDF::Flow::Pipeline

Download:
RDF-Flow-0.178.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.178   Source  

NAME ^

RDF::Flow::Pipeline - Pipelines multiple sources

VERSION ^

version 0.178

SYNOPSIS ^

    use RDF::Flow::Pipeline;

    $src = pipeline( @sources );                  # shortcut

    $src = RDF::Flow::Pipeline->new( @sources );  # explicit

    $rdf = $src->retrieve( $env );
    $rdf == $env->{'rdflow.data'};                # always true

    # pipeline as conditional: if $s1 has content then union of $s1 and $s2
    use RDF::Flow qw(pipeline union previous);
    pipeline( $s1, union( previous, $s2 ) );
    $s1->pipe_to( union( previous, $s2) );        # equivalent

DESCRIPTION ^

This RDF::Flow::Source wraps other sources as pipeline. Sources are retrieved one after another. The response of each source is saved in the environment variable rdflow.data which is accesible to the next source. The pipeline is aborted without error if rdflow.data has not content, so you can also use a pipleline as conditional branch. To pipe one source after another, you can also use a source's pipe_to method.

The module RDF::Flow exports functions pipeline and previous on request.

SEE ALSO ^

RDF::Flow::Cascade, RDF::Flow::Union

AUTHOR ^

Jakob Voß <voss@gbv.de>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Jakob Voß.

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

syntax highlighting: