Skip to content

Commit

Permalink
Document using custom loaders in LOAD_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Jan 24, 2017
1 parent b4b20d4 commit 708a757
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion base/initdefs.jl
Expand Up @@ -30,7 +30,19 @@ isinteractive() = (is_interactive::Bool)
"""
LOAD_PATH
An array of paths (as strings) where the `require` function looks for code.
An array of paths as strings or custom loader objects for the `require`
function and `using` and `import` statements to consider when loading
code. To create a custom loader type, define the type and then add
appropriate methods to the `Base.load_hook` function with the following
signature:
Base.load_hook(loader::Loader, name::String, found::Any)
The `loader` argument is the current value in `LOAD_PATH`, `name` is the
name of the module to load, and `found` is the path of any previously
found code to provide `name`. If no provider has been found earlier in
`LOAD_PATH` then the value of `found` will be `nothing`. Custom loader
functionality is experimental and may break or change in Julia 1.0.
"""
const LOAD_PATH = Any[]
const LOAD_CACHE_PATH = String[]
Expand Down

0 comments on commit 708a757

Please sign in to comment.