Доброго всем! Доброго здоровья! Доброго духа!
Hello all! Nice health! Good thinks!
Loop::Flow::Object - запуск цикла для объекта с контролем и переключением ветвления (fork), выполнение кода в указанных методах объекта.
Loop::Flow::Object - looping code of one object with forking on/off. Simple switch and count of forks.
Executing code, control count and exit from loop by the object methods.
Version 0.03
package Some::My::Module; sub new { my $class = shift; ... } sub one {# main code in loop my $self = shift; my @data = @_; ... } sub data {# data for main code in loop my $self = shift; my $count = shift; ... } sub end {# end hook my $self = shift; .... } package main; use Loop::Flow::Object; use Some::My::Module; my $obj = Some::My::Module->new(...); my $loop = Loop::Flow::Object->new(max_count=>..., forks=>..., debug=>...); $loop->start($obj, main=>'one', data=>'data', end=>'end',); ...
None.
Options:
max_count => <integer> (optional)
infinitely looping if max_count => 0 || undef (default)
forks => <integer> (optional)
Limit of forks No forking, sequentially if forks => 0 || undef (default)
debug => 0|1 (optional)
0 - no print msg (default)
Looping/forking for $obj which have methods:
main => string '<main_method>' - main code which execute in loop (as child process if forks) (mandatory)
data => string '<data_method>' - hook which get/return data for '<main_method>'
Returning list of data will pass to the main method.
Attention. If you define this method and it's return empty list - WILL STOPS THE LOOPING, but will wait for childs if any.
end => string '<end_method>' - hook which execute when end the '<main_method>' of one loop (child process exit if forks)
Mikhail Che, <m.che a@t aukama.dyndns.org>
<m.che a@t aukama.dyndns.org>
Please report any bugs or feature requests to bug-loop-flow at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Loop-Flow. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-loop-flow at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Loop::Flow::Object
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Loop-Flow-Object
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Loop-Flow-Object
CPAN Ratings
http://cpanratings.perl.org/d/Loop-Flow-Object
Search CPAN
http://search.cpan.org/dist/Loop-Flow-Object/
Copyright 2012 Mikhail Che.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Loop::Flow::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Loop::Flow::Object
CPAN shell
perl -MCPAN -e shell install Loop::Flow::Object
For more information on module installation, please visit the detailed CPAN module installation guide.