The lib library provides the foundation for dynamic library loading in the MCSH framework.
$lib_loaded[]
Lists libraries in the order they were loaded
$lib_inited[]
Lists libraries in the order they were initialized
lib_load_check()
Check library loads, temporarily alterning logging messages to improve debugging. This definition replaces the basic implementation provided by the main runtime library (mcsh).
check for built-in library
lib_load_dispatch()
Loads library ($1) and runs command in namespace ($2)
lib_load_dispatch_ns()
Loads the named library ($1) and runs the command in default namespace
The functions provided in this section should only be used inside the config_init callback of libraries to define their settings. For more information, see the core/settings library.
lib_setting_vars()
Adds variable settings for the current library.
lib_setting_arrays()
Adds array settings for the current library.
lib_setting_assocs()
Adds associative arrays for the current library.
lib_setting_funcs()
Adds function settings for the current library.
lib_cmd_name()
Prints a library command name for the given commands ($@)
lib_cmd_exists()
Returns true if a library ($1) contains a function to handle the given commands ($@).
lib_cmd_exec()
Runs a command ($2) in a library ($1), if it exists.
$1 - Library name
$2 - Command name
$@ - Extra arguments
lib_cmd_dispatch()
Dispatches commands in the given library namespace ($1).
for_each_lib()
Calls the given command ($@) for each initialized library.
for_each_lib_loaded()
Calls the given command ($@) for each loaded library.
lib_dep_list()
Prints list of library dependencies for the given library script file ($1)
lib_deps()
Prints list of dependencies for the given library ($1)
lib_check()
Runs the check method for the named library ($1)
lib_check_all()
Runs the check method for all libraries