NAME
Acme::SexualReproduction - beacuse fork() is for unicellular ones.
VERSION
Version 0.01
SYNOPSIS
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.
EXPORT
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).
male($id, \%chromosomes);
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.
$pid = female($id, \%chromosomes)
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.
AUTHOR
Ivan Krylov, <krylov.r00t at gmail.com>
BUGS
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.
SUPPORT
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
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
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.