ad_arg_parser (public)

 ad_arg_parser allowed_args argv

Defined in packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl

Parses an argument list for a database call (switches at the end). Switch values are placed in corresponding variable names in the calling environment. GN: This function is a hack to overcome shortcomings of argument parsing at the first place, since the old-style argument parser of OpenACS does NOT support non-positional arguments after the positional ones. Since the advent of XOTcl2, this limitation is gone and just used for installations without XOTcl.... but since XOTcl is required since many years, this is not an issue anymore.

Parameters:
allowed_args (required)
a list of allowable switch names.
argv (required)
a list of command-line options. May end with args to indicate that extra values should be tolerated after switches and placed in the args list.
Error:
if the list of command-line options is not valid.

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_arg_parser ad_arg_parser (test acs-bootstrap-installer) ad_arg_parser ad_arg_parser test_ad_arg_parser->ad_arg_parser ad_page_contract ad_page_contract (public) ad_page_contract->ad_arg_parser db_blob_get db_blob_get (public) db_blob_get->ad_arg_parser db_blob_get_file db_blob_get_file (public) db_blob_get_file->ad_arg_parser db_dml db_dml (public) db_dml->ad_arg_parser db_foreach db_foreach (public) db_foreach->ad_arg_parser

Testcases:
ad_arg_parser
[ show source ]
Show another procedure: