Getters and setters for module options. Deprecated and kept for backward compatibility.

module_options(name = .Last.name)

name %has_default_option% options

name %has_default_options% options

name %has_option% options

name %has_options% options

Arguments

name

A string (character vector of lenght one).

A module name can contain letters, figures and some special characters, namely _, -, and /. The latter is a namespace separator.

Names containing /mock/, /mocks/, /test/, /tests/, /example/, or /examples/ have a special meaning related to code testing and examples.

The name "modulr" corresponds to a special module and is therefore reserved.

options

A (named) list of options.

Value

A list of getters and setters. See config.

Syntactic Sugars

name %has_default_option% options and name %has_default_options% options for module_options(name)$set(options, drop = FALSE).

name %has_option% options and name %has_options% options for module_options(name)$set(options, drop = TRUE).

Warning

It is considered a very bad practice to define, touch, undefine, load, make, reset, or perform any other operation from within a module definition that may alterate the internal state of modulr.

Deprecated and kept for backward compatibility.