NAME
Flow - Make data flow processing easy
SYNOPSIS
use Flow;
my $flow = create_flow( Splice=>20, sub{ [ grep { $_ > 1 } @_ ] } )
my $c1 = new Flow::Code:: {
flow => sub { my $self = shift; $self->{count_}++ for @_; return},
end => sub {
my $self = shift;
$self->put_flow( $self->{count_} );
[@_]
}
};
create_flow( $c1, new Flow::To::XML::(\$str) );
$c1->run(1..1000);
DESCRIPTION
Flow - a set of modules for data flow processing.
FUNCTIONS
create_flow "MyFlow::Pack"=>{param1=>$val},$my_flow_object, "MyFlow::Pack1"=>12, "MyFlow::Pack3"=>{}
Use last arg as handler for out.
return flow object ref.
my $h1 = new MyHandler1::;
my $flow = create_flow( 'MyHandler1', $h1 );
#also create pipe of flows
my $filter1 = create_flow( 'MyHandler1'=>{}, 'MyHandler2'=>{} );
my $h1 = new MyHandler3::;
my $flow = create_flow( $filter1, $h1);
split_flow $flow
Return array of handlers
METHODS
SEE ALSO
AUTHOR
Zahatski Aliaksandr, <zag@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Zahatski Aliaksandr
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.