Skip to content

Commit 755218a

Browse files
committed
fix: package lib
1 parent 6aa6a4f commit 755218a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

docs/reference/package-lib.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
# Package Library
22

3-
The package library is in its usual place in the `package` global. It has a reasonable number of distinctions to the standard Lua 5.2 `package` global, they are noted here.
3+
The package library is in its usual place in the `package` global. It has a reasonable number of distinctions to the standard Lua 5.2 `package` library, they are noted here.
4+
5+
For complete documentation on the `package` library see [Lua 5.2 Reference Manual - Modules](https://www.lua.org/manual/5.2/manual.html#6.3).
46

57
::: info
6-
Libraries (like `package`) are distinct between scripts. If a package is provided in the `package.preload` table in script A, it will not be present in the `package.preload` of script B.
8+
Libraries (like `package`) are distinct between scripts. If a package is provided in the `package.loaded` table in script A, it will not be present in the `package.loaded` of script B.
79
:::
810

911
## `package.config`
1012

1113
While the `package.config` string is the same between standard Lua and Allium, The fourth (`!`) and fifth (`-`) lines are unused.
1214

13-
For more information see [Lua 5.2 Reference Manual - `package.config`](https://www.lua.org/manual/5.2/manual.html#pdf-package.config)
15+
For more information see [Lua 5.2 Reference Manual - `package.config`](https://www.lua.org/manual/5.2/manual.html#pdf-package.config).
1416

1517
## `package.cpath`
1618

1719
Allium uses [Cobalt](https://github.com/cc-tweaked/Cobalt), a Lua interpreter written in Java. There's no ability for C libraries to be loaded. As such, the value of `package.cpath` is `nil`.
1820

19-
For more information see [Lua 5.2 Reference Manual - `package.cpath`](https://www.lua.org/manual/5.2/manual.html#pdf-package.cpath)
21+
For more information see [Lua 5.2 Reference Manual - `package.cpath`](https://www.lua.org/manual/5.2/manual.html#pdf-package.cpath).
2022

2123
## `package.loadlib()`
2224

2325
Similar to `package.cpath`, C libraries cannot be loaded by Cobalt. `package.loadlib()` is not present (`nil`).
2426

25-
[Lua 5.2 Reference Manual - `package.loadlib`](https://www.lua.org/manual/5.2/manual.html#pdf-package.loadlib)
27+
For more information see [Lua 5.2 Reference Manual - `package.loadlib`](https://www.lua.org/manual/5.2/manual.html#pdf-package.loadlib)
2628

2729
## `package.path`
2830

2931
The default `package.path` is `"./?.lua;./?/init.lua"`
3032

31-
[Lua 5.2 Reference Manual - `package.path`](https://www.lua.org/manual/5.2/manual.html#pdf-package.path)
33+
For more information see [Lua 5.2 Reference Manual - `package.path`](https://www.lua.org/manual/5.2/manual.html#pdf-package.path).
3234

3335
## `package.searchers`
3436

@@ -38,10 +40,10 @@ Package searchers are iterated over by `require`. The following searchers are pr
3840
3. **External Script**: The first loader that's unique to Allium. When provided a script ID, if it has a module, will provide it. A script provides a module by returning it in
3941
4. **Java**: The second and final loader that's unique to Allium. When provided a path to a class, the class will be loaded, and then provided.
4042

41-
[Lua 5.2 Reference Manual - `package.searchers`](https://www.lua.org/manual/5.2/manual.html#pdf-package.searchers)
43+
For more information see [Lua 5.2 Reference Manual - `package.searchers`](https://www.lua.org/manual/5.2/manual.html#pdf-package.searchers).
4244

4345
## `package.searchpath()`
4446

4547
The working directory of `package.searchpath()` is the script's root.
4648

47-
[Lua 5.2 Reference Manual - `package.searchpath`](https://www.lua.org/manual/5.2/manual.html#pdf-package.searchpath)
49+
For more information see [Lua 5.2 Reference Manual - `package.searchpath`](https://www.lua.org/manual/5.2/manual.html#pdf-package.searchpath).

0 commit comments

Comments
 (0)