05 Sep 2013 19:09:46 UTC
- Distribution: Acme-SexualReproduction
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (276 / 10 / 0)
- KwaliteeBus factor: 0
- 88.73% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity24 month
- Download (4.5KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionAITAP Иван Крыловand 1 contributors
- Ivan Krylov
- LICENSE AND COPYRIGHT
Acme::SexualReproduction - beacuse fork() is for unicellular ones.
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.
<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.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
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.
Module Install Instructions
To install Acme::SexualReproduction, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Acme::SexualReproduction
For more information on module installation, please visit the detailed CPAN module installation guide.