Editing version 1 of page APIs_RegPostInitSub (this is the most recent revision)
Note: This page is defined as a special page, and as such its final state may be different from what you see here.
Use template:
None
API_Template
DevTrack_Template
Version_Template
==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.
This page is a template
Summary:
User name:
Upload a file
By contributing to this wiki, you acknowledge that you waive your right to claim copyright of your individual contributions. The text of this site is uncopyrighted and released to the public domain.
Show markup help Styling **bold **, //italic //, __underline __, --strikethrough--, `teletype ` Headers = Level 1 =, == Level 2 ==, === Level 3 ===, ==== Level 4 ====, ===== Level 5 ===== (ending ='s optional) Lists * Unordered List, # Ordered List, ** Level 2 unordered, ### Level 3 ordered (up to 5 levels, NO SPACES IN FRONT) Links [[Page]], [[Page|description]], [[http://link]], [[http://link|description]] Images {{image.jpg}}, {{right:image.jpg}} (right aligned), [[link|{{image.jpg}}]] (image linked to link), {{image.jpg|alt text}} Extras ---- (horizonal rule), ~~~~ (signature)