diff --git a/doc/Makefile b/doc/Makefile index 2265458c..e927e58c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -12,7 +12,8 @@ MAN4_DIR := $(MAN_DIR)/man4 SOURCE_DIR := source all: $(HTML_DIR)/module.html $(HTML_DIR)/modulefile.html \ - $(MAN1_DIR)/module.1 $(MAN4_DIR)/modulefile.4 + $(MAN1_DIR)/module.1 $(MAN4_DIR)/modulefile.4 \ + $(HTML_DIR)/diff_with_c-version.html $(HTML_DIR)/%.html: $(SOURCE_DIR)/%.pod $(VERSION_FILE) mkdir -p $(HTML_DIR) diff --git a/doc/source/diff_with_c-version.pod b/doc/source/diff_with_c-version.pod new file mode 100644 index 00000000..6c7ac981 --- /dev/null +++ b/doc/source/diff_with_c-version.pod @@ -0,0 +1,115 @@ +=head1 Slight differences with C-version + +This document lists the differences of the functionalities that can be found on the C-version of the Modules package compared to the Tcl-version. The goal of this document is to reference the features of the C-version that are missing or behave differently on the Tcl-version. These information help to clearly know what functionalities was there on C-version that will change in case of migration to the Tcl-version. + +This document does not cover the features of the Tcl-version that are not available on the C-version (like collection management, Fish or Tcl shell support, etc). Please refer to the B(1) and the B(4) man-pages of the Tcl-version to discover all the functionalities provided by the Tcl-version of the Modules package. + +=head2 Package Initialization + +Tcl-version does not support I and I as code output. + +B environment snapshot functionality is not supported on Tcl-version. + +=head2 Command line switches + +Command line switches relative to a sub-command must be specified on the command line after the sub-command. For instance C will raise an error on Tcl-version, C should be used instead. + +=over + +=item B<--force>, B<-f> + +=item B<--human>, B<-h> + +=item B<--verbose>, B<-v> + +=item B<--silent>, B<-s> + +=item B<--create>, B<-c> + +=item B<--icase>, B<-i> + +=item B<--userlvl> lvl, B<-u> lvl + +These command line switches are not supported on Tcl-version. + +=back + +=head2 Module Sub-Commands + +On C-version, paths composing the B environment variable may contain reference to environment variable. These variable references are resolved dynamically when B is looked at during module sub-command action like B. + +=over + +=item B + +=item B + +These module sub-commands are not supported on Tcl-version. + +=item B + +On C-version, only the shell aliases defined by the currently loaded modulefiles are set again on a B command. Whereas on Tcl-version this command is an alias on the B command that B then B all the currently loaded modulefiles. + +=item B + +C-version redirects output made on stdout in B Tcl procedure to stderr. + +During an B sub-command, only the B Tcl procedure of a modulefile is interpreted on C-version. Tcl-version interprets all the content of the modulefile, then call the B procedure if it exists. + +=item B + +On Tcl-version the value of an environment variable is set even if the new value is the same as the current value of this variable in environment. + +=item B + +When switching on Tcl-version an I modulefile by a I one, no error is raised if I modulefile is not currently loaded. + +When switching on Tcl-version an I modulefile by a I one, this I modulefile does not keep the position that the I modulefile had in the B list as done on C-version but it is appended to the end of the list. Same goes for PATH-like environment variables: replaced PATH component is appended to the end or prepended to the beginning of the relative PATH-like variable, not appended or prepended relatively to the position hold by the swapped PATH component. + +=back + +=head2 Modules Specific Tcl Commands + +=over + +=item B + +On Tcl-version code passed to the B Modules specific Tcl command will not be thrown to be the B return value. + +=item B + +=over + +=item B + +=item B + +=item B + +=item B + +These B options are related to C-version specific features so they are available on Tcl-version but with a dummy implementation that always returns false or an empty value. + +=item B + +During an B sub-command, I is returned instead of I. However if B is tested against I value, true will be returned. + +During a B sub-command, I then I is returned instead of I then I then I. However if B is tested against I value, true will be returned. + +=back + +=item B + +=item B + +=item B + +=item B + +These Modules specific Tcl commands are related to C-version specific features so they are available on Tcl-version but with a dummy implementation that always displays a warning message saying the command is not implemented. + +=item B + +When multiple words are passed as argument to B but they are not enclosed in double-quotes or curly braces they will be displayed as a single line on Tcl-version whereas C-version displays them as one line per word. + +=back