AnyEvent-Fork
view release on metacpan or search on metacpan
Fork/Early.pm view on Meta::CPAN
192021222324252627282930313233343536373839the 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,
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.222 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )