# NOT RUN {
mod_a <- mod::ule({
# names included in provide() are public, however...
mod:::provide(var,.var, ..var)
# It is suggested to omit mod::: when using
var <- 1
.var <- 2
..var <- 3 # objects denoted by .. prefix are always private.
another_var <- 4 # objects not included in provide() are also private.
})
mod_b <- mod::ule({
# if no call to provide(), all objects are public, except...
var <- 1
.var <- 2
..var <- 3 # objects denoted by .. prefix are always private.
})
ls(mod_a)
ls(mod_b)
# }
Run the code above in your browser using DataLab