dluxhu / perl-parallel-forkmanager

Parallel::ForkManager
20 stars 11 forks source link

Warning if new() is called without parameters #26

Open eserte opened 5 years ago

eserte commented 5 years ago

With 2.xx:

$ perl5.28.0 -MParallel::ForkManager -e 'Parallel::ForkManager->new()' 
Use of uninitialized value $args[0] in pattern match (m//) at /opt/perl-5.28.0/lib/site_perl/5.28.0/Parallel/ForkManager.pm line 73.
Missing required arguments: max_proc at -e line 1.

First, this is a change to 1.xx: formerly it was possible to call new without parameters, which acted as be called with 0. However, it was always documented that new has to be called with at least one parameter, so the change is 2.xx could be regarded as OK. However it would be nice to get rid of the "unitialized value" warning.