Reload & ReloadAll

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

Reload

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:

PerlEx::Reload();

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

ReloadAll

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:

PerlEx::ReloadAll();

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.