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 theargs
list.- Error:
- if the list of command-line options is not valid.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_arg_parser