Qore will scan the command-line for the options in the following table. Arguments after the script name will be passed to the script in the global $ARGV
variable as a list of options. $ARGV[0]
will be the first option and will not be the script name. If no script name is given and the --exec
option is not used, then Qore code is read from standard input.
qore
[options] script.q
Table 5.1. Parse Option Command-Line Parameters
Long Param | Short | Description |
---|---|---|
|
| Loads a module immediately. The argument can be a module/feature name or an absolute path to the module. |
|
| Disallows the use of global variables. Equivalent to parse option |
|
| Disallows subroutine (function) definitions. Equivalent to parse option |
|
| Disallows any thread control operations (background operator and thread_exit statement, for example). Equivalent to parse option |
|
| Disallows access to thread classes (for example, the Thread::Mutex Class, Thread::Gate Class, Thread::Queue Class, etc). Equivalent to parse option |
|
| Disallows access to both thread control and thread classes (equivalent to the --no-thread-control and --no-thread-classes options documented above). Equivalent to parse option |
|
| Disallows top level code. Equivalent to parse option |
|
| Disallows class definitions. Equivalent to |
|
| Disallows new namespace definitions. Equivalent to |
|
| Disallows any access to external processes (with system(), backquote(), exec(), the backquote operator, etc). Equivalent to parse option |
|
| Disallows access to functions that would affect the current process (exit(), fork(), etc). Equivalent to parse option |
|
| Disallows access to the local filesystem; puts the |
|
| Disallows constant definitions. Equivalent to parse option |
|
| Disallows access to the network; puts the |
|
| Disallows use of the new operator. Equivalent to parse option |
|
| Disallows use of database functionality. Equivalent to parse option |
|
| Allows child program objects to have parse option restrictions that are not a strict subset of the parents. Equivalent to parse option |
|
| Requires global variables to be declared with our prior to use (similar to perl's use strict vars pragma). Equivalent to parse option |
|
| Prohibits further changes to parse options (equivalent to the |
|
| Prohibits further changes to the warning mask. Equivalent to parse option |
|
| Enables all warnings. Equivalent to the |
|
| Enables the named warning. Equivalent to the |
|
| Lists all valid warnings in Qore and exits immediately. |
Table 5.2. Miscellaneous Command-Line Parameters
Long Param | Short | Description |
---|---|---|
|
| parses and executes the argument text as a Qore program. If this option is specified then any script given on the command-line will be ignored. |
|
| parses and executes the argument text as a Qore program, instantiating the class with the same name as the program (with the directory path and extension stripped); also turns on |
|
| Shows any errors loading Qore modules |
|
| Sets the default character encoding for the program |
| Shows a list of all known character encodings | |
| Shows a list of all known character encoding aliases | |
|
| Shows help text |
|
| Shows program version information and exits |
There are two additional options available with debugging versions of Qore as follows:
Table 5.3. Description of Debugging Command-Line Parameters
Long Param | Short | Description |
---|---|---|
--debug= | -d | Turns on Qore debugging output. Higher |
--trace | -t | Turns on Qore tracing. This option is only available with DEBUG builds. |