- Publicity: Public Only All
00-icanuse-procs.tcl
An API for checking optional features (name inspired by caniuse.com)
- Location:
- packages/acs-tcl/tcl/00-icanuse-procs.tcl
- Created:
- 4th June 2019
- Author:
- Gustaf Neumann
Procedures in this file
- acs::cmd_error_contains (private)
- acs::cmd_has_subcommand (private)
- acs::icanuse (public)
- acs::register_icanuse (public)
Detailed information
acs::cmd_error_contains (private)
acs::cmd_error_contains cmd subcommand
Helper proc abusing error messages to determine, whether the error message contains some string. This is a weeker form of cmd_has_subcommand.
- Parameters:
- cmd (required)
- subcommand (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs::cmd_has_subcommand (private)
acs::cmd_has_subcommand cmd subcommand
Helper proc abusing error messages to determine, whether as submethod is available, since there is in Tcl no generic way to determine subcommands for a command. Note: Use this with caution, this is NOT GUARANTEED to work with every command, since many commands require e.g. a connection or return different error messages. When using this in more cases, test first! Therefore, this is a PRIVATE function, not intenended for public use.
- Parameters:
- cmd (required)
- subcommand (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs__command_has_subcommand
acs::icanuse (public)
acs::icanuse feature
Check, if a (previously registered) feature can be used in an installation. These features are typically version dependent features of NaviServer. The checking of the availability of these features is typically more complex than a plain "info commands ...".
- Parameters:
- feature (required)
- name for a feature, can contain blanks
- Returns:
- boolean value
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_icanuse
acs::register_icanuse (public)
acs::register_icanuse feature condition
Registry function for acs::caniuse.
- Parameters:
- feature (required)
- name for a feature, can contain blanks
- condition (required)
- expression to determine availability
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_icanuse