POE::Wheel::Spawner is based on POE::Wheel::Run. This module offers a smart facility to arrange a minimal required nummer of subprocesses
use POE::Wheel::Spawner;
my $foo = POE::Wheel::Spawner->new(
pool_size => 2,
stop_if_done => 1,
workload => sub { _workload() }
);
$foo->run();
sub _workload {
# request for a new sibling
$foo->spawn($$);
# do some stuff
}