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

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
subcommand

Partial Call Graph (max 5 caller/called nodes):
%3

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
subcommand

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs__command_has_subcommand acs__command_has_subcommand (test acs-tcl) acs::cmd_has_subcommand acs::cmd_has_subcommand test_acs__command_has_subcommand->acs::cmd_has_subcommand

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 - name for a feature, can contain blanks
Returns:
boolean value

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_icanuse acs_icanuse (test acs-tcl) acs::icanuse acs::icanuse test_acs_icanuse->acs::icanuse Class ::xo::Context Class ::xo::Context (public) Class ::xo::Context->acs::icanuse Object ::throttle Object ::throttle (public) Object ::throttle->acs::icanuse ad_conn ad_conn (public) ad_conn->acs::icanuse ad_enhanced_text_escape_disallowed ad_enhanced_text_escape_disallowed (private) ad_enhanced_text_escape_disallowed->acs::icanuse ad_html_to_text_put_text ad_html_to_text_put_text (private) ad_html_to_text_put_text->acs::icanuse

Testcases:
acs_icanuse

acs::register_icanuse (public)

 acs::register_icanuse feature condition

Registry function for acs::caniuse.

Parameters:
feature - name for a feature, can contain blanks
condition - expression to determine availability

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_icanuse acs_icanuse (test acs-tcl) acs::register_icanuse acs::register_icanuse test_acs_icanuse->acs::register_icanuse

Testcases:
acs_icanuse
[ show source ]