sub max_processes { 5; }if you're trying to make this an inlined constant, you'll need to provide an empty prototype. i prefer making my constants ALL CAPS, and referring to them without a sigil. something like:
sub MAX_PROCESSES() { 5 }
and later...
$pm = Parallel::ForkManager->new(MAX_PROCESSES);
you'll find more info on this technique in perlsub.
~Particle *accelerates*
In reply to Re^3: Graceful shutdowns and Parallel::ForkManager
by particle
in thread Graceful shutdowns and Parallel::ForkManager
by atcroft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |