Flow - Make data flow processing easy
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);
Flow - a set of modules for data flow processing.
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);
Return array of handlers
Zahatski Aliaksandr, <zag@cpan.org>
Copyright (C) 2015 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.
To install Flow, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Flow
CPAN shell
perl -MCPAN -e shell install Flow
For more information on module installation, please visit the detailed CPAN module installation guide.