New Features in Lmod

Controlling installed permission:
(Lmod 8.7.10+): Lmod now uses your umask to set permissions unless your user id (id -u) is less than 500. In that case, it uses a umask of 022. This translates to 755 for executable files and 644 for all others. Sites can override this at configure time with –with-mode=MODE.
LMOD_SYSTEM_DEFAULT_MODULES:
(Lmod 8.7.7+) If a site has no system default modules they can set this variable to __NO_SYSTEM_DEFAULT_MODULES__. This will allow module reset to purge all modules and reset $MODULEPATH to the system default.
Dynamic Spider Cache Support:
(Lmod 8.7.4+): If a modulefile changes $MODULEPATH, it is marked as dynamic and is re-read when performing a module spider. This is to allow sites to dynamically add in modulefiles in user directories. This can be turned off at configure time or with by setting LMOD_DYNAMIC_SPIDER_CACHE=no.
Warning when reading too many non-modulefile:
Lmod (8.7.4+): To catch directory that are full of non-modulefiles, Lmod count the number of regular files that do not start with a “.”. If there are more than 100, Lmod reports a warning.
Loading a modulefile too many times:
(Lmod 8.7.3+): Lmod throws an error if any modulefile is loaded 500 time or more in a single module command. This is to prevent infinite load loops.
An unload cannot fail:
As of Lmod 8.7+, an error found during unload is treated as a warning.
puts stdout:
This TCL modulefile will generate its output at the end of the modulefile evaluation and not the beginning. New in Lmod 8.7. This matches Tmod 4.1
puts prestdout:
This TCL modulefile will generate its output at the beginning of the modulefile evaluation. New in Lmod 8.7. This matches Tmod 5.1.
LmodBreak:

LmodBreak() modulefile function causes the evaluation of the current modulefile to stop and all changed in the user’s environment to be ignored from the current modulefile. However, all other modulefiles are evaluated. In TCL modulefiles, this command is break. Break works normally inside a loop. If a bare break is found outside a loop, it cause the current modulefile stop its processing. New in Lmod 8.7+

Note As of Lmod 8.6.16: LmodBreak()/break does nothing when unloading.

/etc/lmod/lmod_config.lua:

Lmod looks for a file named lmod_config.lua in the LMOD_CONFIG_DIR which is by default /etc/lmod/lmod_config.lua. This file allows sites configure lmod through lua instead of setting environment variables by using the cosmit:assigin() functions:

cosmit:assign("LMOD_SITE_NAME","XYZZY")

See Configuring Lmod with /etc/lmod/lmod_config.lua: for details. New in Lmod 8.6+

LMOD_QUARANTINE_VARS:

This is an environment variable containing a list of environment variables that Lmod will not change the value of. Note that this only applies to non-path variables. Variables such as PATH or LD_LIBRARY_PATH are ignored in this variable. In other words, Lmod could change any path like variables. New in Lmod 8.6+
source_sh (“shellName”,”shell_script arg1 …”):

source a shell script as part of a module. Supported shellNames are sh, dash, bash, zsh, csh, tcsh, ksh. When loading, Lmod automatically converts the shell script into module commands and saves the module commands in the environment. It does this by sourcing the shell script string in a subshell and comparing the environment before and after sourcing the shell script string. When unloading, the saved module commands from the environment are used.

See Shell scripts and Lmod for details (New in version 8.6)

sh_to_modulefile:
New in version 8.6, it now track converts alias and shell functions as well as environment variables into a modulefile.
LMOD_SITE_MODULEPATH:
An colon separated list of directories to be prepended to $MODULEPATH before the first call to the Lmod command. See Installing Lmod for details New in version 8.5.18
module overview:

Similar to module avail, this command prints the just module name and not the name and the version. The number of versions is printed next to the module name: For example:

$ module overview

------------ /apps/modulefiles/Core -------------
StdEnv    (1)   hashrf    (2)   papi        (2)
ddt       (1)   intel     (2)   singularity (2)
git       (1)   noweb     (1)   valgrind    (1)

New in version 8.5.10+

sh_to_modulefile:
New in version 8.6, it now track converts alias and shell functions as well as environment variables into a modulefile.
extension():
New in version 8.2.5+, Lmod provides a module function which says that these packages available when this module is loaded. See Module Extensions for details.
depends_on():
A safe way to have one module load another. See Dependent Modules for details. New in version 7.5.12+