Reload & ReloadAll

Two additional built-in functions that are accessible to all scripts executing under PerlEx are Reload and ReloadAll.


The Reload function causes the current interpreter to reload when the script exits. The interpreter will be reinitialized before the next request processed by that interpreter is executed.

To call the Reload function:


Reload can be useful if you know that there is something wrong with a specific interpreter.


The ReloadAll function causes all interpreters in the Interpreter Class to be reloaded; interpreters belonging other Interpreter Classes will remain unaffected. If the executing script doesn't belong to a named Interpreter Class, all interpreters in the Default Interpreter Class will be reloaded. Interpreters currently in use (i.e. running a Perl program) will reload when the script finishes execution. Interpreters not currently in use will be reloaded immediately.

To call the ReloadAll function:


ReloadAll can be useful if you have changed one of your scripts that contains a use or require statement and don't want to restart your server.