Subroutine Name

RegPostInitSub

Explanation and Usage

Registers a subroutine you wish to be run at the tail end of the Aneuch Init() process (see Script Flow for more information on the load order of Aneuch's various components).

This is useful in situations where you might want to set certain variables in your config.pl file, but you reference other variables that don't get initialized until later in the Init process (config.pl gets loaded before a lot of various internal variables get set, again, reference Script Flow for a complete overview of the init order).

Note that the subroutines registered by this API will execute in the order in which they were registered. Keep that in mind if you are troubleshooting why your post init sub doesn't seem to be working properly (there could be a post init sub registered after yours that modifies the same data that yours does, which would clobber any modifications your subroutine has made).

Syntax

RegPostInitSub(Subroutine)

Options

Subroutine - This is the name of the subroutine you wish to have executed just before Init() completes. Must be entered in this format: \&SubroutineName

Examples

This function is not called in the Aneuch source anywhere, however this is being provided as an example for plugin developers or site administrators.

RegPostInitSub(\&MyLateLoadSub);
This will register the subroutine 'MyLateLoadSub', which will be executed just before Init() ends.

← Return to API listing