Acme::SexualReproduction - beacuse fork() is for unicellular ones.
Version 0.01
This module allows you to improve the chances of your program kind to survive by mixing genes of their processes when creating a child process. Especially if your program is a K-strategic one.
In a "female" process:
use Acme::SexualReproduction 'female'; my $pid = female('unique ID', \%chromosomes); ...
In a "male" process:
use Acme::SexualReproduction 'male'; male('unique ID', \%chromosomes);
The child is spawned then from the female process.
Only two functions are exported: one for insemination (a "male" process) and one for allocating a shared hash of chromosomes and spawning a child (a "female" process).
Tries to write the chromosomes to the shared memory of the female process with unique SHM $id. Sadly, does not return the child's PID.
Shares a hash for the male process' chromosomes, waits for the insemination, mixes the genes and spawns the child process. \%chromosomes hash reference is changed in the child process.
Ivan Krylov, <krylov.r00t at gmail.com>
<krylov.r00t at gmail.com>
Please report any bugs or feature requests to bug-acme-sexualreproduction at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-SexualReproduction. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-acme-sexualreproduction at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Acme::SexualReproduction
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-SexualReproduction
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Acme-SexualReproduction
CPAN Ratings
http://cpanratings.perl.org/d/Acme-SexualReproduction
Search CPAN
http://search.cpan.org/dist/Acme-SexualReproduction/
Copyright 2013 Ivan Krylov.
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.
To install Acme::SexualReproduction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::SexualReproduction
CPAN shell
perl -MCPAN -e shell install Acme::SexualReproduction
For more information on module installation, please visit the detailed CPAN module installation guide.