Skip to content

Commit f3ff5fa

Browse files
committed
doc: desc module-help in MIGRATING
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 2f6672a commit f3ff5fa

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

MIGRATING.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,33 @@ before or after a particular date.
5959
The ``warning`` tag is set on modules targeted by a mfcmd:`module-warn`
6060
command.
6161

62+
Simplified way to define module help message
63+
--------------------------------------------
64+
65+
Until now module help message was defined through a specific Tcl procedure
66+
that outputs text to *stderr* channel:
67+
68+
.. code-block:: tcl
69+
70+
#%Module
71+
proc ModulesHelp {} {
72+
puts stderr {Module Name: foo, Version: 1.0}
73+
puts stderr {This modulefile does this and that}
74+
}
75+
76+
A new modulefile Tcl command is introduced, :mfcmd:`module-help`, to simplify
77+
a bit the definition of help message:
78+
79+
.. code-block:: tcl
80+
81+
#%Module
82+
module-help {Module Name: foo, Version: 1.0}
83+
module-help {This modulefile does this and that}
84+
85+
With this modulefile command there is no need to define the ``ModulesHelp``
86+
procedure anymore. As :mfcmd:`module-help` is reported on module *display*
87+
evaluation, help message will also be visible there.
88+
6289

6390
v5.5
6491
====

0 commit comments

Comments
 (0)