AnyEvent-Fork
view release on metacpan or search on metacpan
Fork/Early.pm view on Meta::CPAN
the program using it might have loaded modules that are not fork friendly
(event loops, X11 interfaces and so on).
However, in some cases, there is no external perl interpreter to execute,
for example, when you use L<App::Staticperl> or L<PAR::Packer> to embed
perl into another program, and that program runs on another system without
perl installed.
And anyway, forking would still be more efficient, if it were possible.
And, as you hopefully guessed, this module makes this possible - it must
be run by the main program (i.e. to cannot be used in a module), and as
early as possible. How early? Well, early enough so that any other modules
can still be loaded and used, that is, before modules such as AnyEvent or
Gtk2 are being initialised.
Upon C<use>'ing the module, the process is forked, and the resulting
process is used as a template process for C<new> and C<new_exec>, so
everything should just work out.
Please resist the temptation to delay C<use>ing this module to
( run in 0.328 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )