[comment {--- punk::docgen generated from inline doctools comments ---}] [comment {--- punk::docgen DO NOT EDIT DOCS HERE UNLESS YOU REMOVE THESE COMMENT LINES ---}] [comment {--- punk::docgen overwrites this file ---}] [manpage_begin punkshell_module_punk::assertion 0 0.1.0] [copyright "2024"] [titledesc {assertion alternative to control::assert}] [comment {-- Name section and table of contents description --}] [moddesc {per-namespace assertions with }] [comment {-- Description at end of page heading --}] [require punk::assertion] [keywords module assertion assert debug] [description] [para] The punk::assertion library has the same semantics as Tcllib's control::assert library for the assert command itself. [para] The main difference is the way in which assert is enabled/disabled in namespaces. [para] Due to commands such as 'namespace path' - the assert command could be available in arbitrary namespaces unrelated by tree structure to namespaces where assert has been directly imported. [para] punk::assertion::active 0|1 allows activating and deactivating assertions in any namespace where the assert command is available - but only affecting the activations state of the namespace in which it is called. [para] If such a non-primary assertion namespace never had active set to 0 or 1 - then it will activate/deactivate when the namespace corresponding to the found assert command (primary) is activated/deactivated. [para] Once marked active or inactive - such a non-primary namespace will no longer follow the primary [section Overview] [para] overview of punk::assertion [subsection Concepts] [para] - [subsection dependencies] [para] packages used by punk::assertion [list_begin itemized] [item] [package {Tcl 8.6}] [list_end] [section API] [subsection {Namespace punk::assertion::class}] [para] class definitions [list_begin enumerated] [list_end] [comment {--- end class enumeration ---}] [subsection {Namespace punk::assertion}] [para] Core API functions for punk::assertion [list_begin definitions] [list_end] [comment {--- end definitions namespace punk::assertion ---}] [subsection {Namespace punk::assertion::lib}] [para] Secondary functions that are part of the API [list_begin definitions] [list_end] [comment {--- end definitions namespace punk::assertion::lib ---}] [section Internal] [subsection {Namespace punk::assertion::system}] [para] Internal functions that are not part of the API [manpage_end]