[Oddity] _G in package.loaded
"'Martin Eden' via lua-l" <[email protected]> Fri, 12 Jun 2026 15:34:45 +0200
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
Hello list,
While working on my deploy generator I discovered that
"_G" is present in "package.loaded":
$ lua
Lua 5.5.0 Copyright (C) 1994-2025 Lua.org, PUC-Rio
> package.loaded._G
table: 0x55fb5ddbcbc0
I expect this table be name map for modules loaded via require().
(And no, I have no "require('_G')" in my code.)
Any ideas why it's so?
-- Martin
--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/2d2aa0a3-3ca1-4fae-be87-f526799880eb%40disroot.org.