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).

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.


Ivan Krylov, <krylov.r00t at>


Please report any bugs or feature requests to bug-acme-sexualreproduction at, or through the web interface at 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.

    perldoc Acme::SexualReproduction

You can also look for information at:



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 for more information.