[ Main Table Of Contents | Table Of Contents | Keyword Index ]

shellspy_module_punk::assertion(0) 0.1.0 doc "per-namespace assertions with "

Name

shellspy_module_punk::assertion - assertion alternative to control::assert

Table Of Contents

Synopsis

  • package require punk::assertion

Description

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

Overview

overview of punk::assertion

dependencies

packages used by punk::assertion

  • Tcl 8.6

API

Namespace punk::assertion

Core API functions for punk::assertion

Namespace punk::assertion::lib

Secondary functions that are part of the API

Internal

Namespace punk::assertion::system

Internal functions that are not part of the API

Keywords

assert, assertion, debug, module