Sure - as long as your code is cleanly structured and basically functional code without side effects, that's no problem.
As soon as you have global variables and iterate over them or state in the database, this does not apply anymore. For example the following construct will need a major rewrite of the logic because DBI statement handles do not survive fork():
my $sth_items= $dbh->prepare(<<SQL); select * from myitems where date > '20140101'; SQL while(my $item= $sth_items->fetchrow()) { ... lengthy process for each item ... };
You cannot easily apply mce_loop or mce_map there, because you don't want to fetch all rows into the process. So here, the program logic will need a major rewrite.
In reply to Re^3: Does anyone know about the Multi-CPU Module
by Corion
in thread Does anyone know about the Multi-CPU Module
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |