A shared environment between modules.

.SharedEnv

sharedenv()

Value

The shared environment.

Details

The shared environment is bound to the injector being used.

Warning

Do not assign to .SharedEnv in the workspace, because this will always mask the object of the same name in package:modulr.

See also

injector.

Examples

.SharedEnv$foo <- "foo" "foobar" %provides% { function() print(.SharedEnv$foo) } make()()
#> [1] "foo"
.SharedEnv$foo <- "bar" make()()
#> [1] "bar"