> The binary image should represent the interpreters > internal state and the compiled bytecode, as straight > as possible.
Internal state is a problem. > example: > > if (my $binary = hibernate) { > print "Feelin sleepy... Good Night."; > save_to_disk($binary, "~/myscript.pl.sleeps"); > exit; > } else { > print "Im awake !"; > } > > # perl myscript.pl > Feelin sleepy... Good Night. > > # perl myscript.pl.sleeps > Im awake ! > > > Of course, the delicate things like open file handles, permissions... would > have to be handled by a supporting Module. And the problem: An always executing process will have to look after all the open filehandles, sockets etc. This really should be a child process. Scripts dependent on signals - you could hibernate the script before it was due to catch a signal. Perl code with signals are already painful to debug. IMSOHO this is impossible to implement sucessfully, without turning Perl into a non-portable, complex and slow language. You could however, with whatever they now call 'use less memory' when sleep (with more than a few seconds) get Perl to push it's state onto disk and arrange for it to be swapped out of disk several seconds before resuming. That seems pointless, since that's what your operating system's memory management is for. Jonathan Paton ===== s''-//--/\\///|-\/\|--\--/-\-/\-//\-|/\\\|/\///|-\--\\\\', s''/-\\\/|///|-|/|/--\--/--//\|\/\||/|/-/\\\-/\///|-\-\-', y'|\/-'3210',$_=join qq\\,map{s|2|10|||s|3|11|||s|^|0|;$_} m|.|g;map{print chr unpack'N',pack'B32','0'x24 .$_}/.{8}/g __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com