shellspy_module_punk::assertion - assertion alternative to control::assert
The punk::assertion library has the same semantics as Tcllib's control::assert library for the assert command itself.
The main difference is the way in which assert is enabled/disabled in namespaces.
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.
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.
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.
Once marked active or inactive - such a non-primary namespace will no longer follow the primary
Internal functions that are not part of the API
Copyright © 2024