Changeset

504:8ed3c95bf880

squishy: Move the verse namespace prefix into a single place Less repetition Seemed weird that ProsodyModule = VerseModule
author Kim Alvefur <zash@zash.se>
date Fri, 23 Jun 2023 22:21:05 +0200
parents 503:395ae8df5a9e
children 505:289c866d7fb0
files squishy
diffstat 1 files changed, 18 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/squishy	Fri Jun 23 22:20:24 2023 +0200
+++ b/squishy	Fri Jun 23 22:21:05 2023 +0200
@@ -1,8 +1,10 @@
 Output "verse.lua"
 
-local VerseModule = Module
+local function VerseModule(s)
+	return Module("verse."..s);
+end
 local function ProsodyModule(s)
-	return VerseModule("prosody." .. s)
+	return Module("prosody." .. s)
 end
 
 function ProsodyModules()
@@ -110,28 +112,27 @@
 }
 
 for _, plugin in ipairs(plugins) do
-	VerseModule("verse.plugins." .. plugin)("plugins/" .. plugin .. ".lua")
+	VerseModule("plugins." .. plugin)("plugins/" .. plugin .. ".lua")
 end
 
 -- Verse-specific versions of libraries
-VerseModule "verse.util.adhoc" "libs/adhoc.lib.lua"
-VerseModule "verse.util.bit" "libs/bit.lua"
-VerseModule "verse.util.encodings" "libs/encodings.lua"
-VerseModule "verse.util.hashes" "libs/hashes.lua"
-VerseModule "verse.util.table" "libs/table.lua"
-VerseModule "verse.util.vcard" "util/vcard.lua"
+VerseModule "util.adhoc" "libs/adhoc.lib.lua"
+VerseModule "util.encodings" "libs/encodings.lua"
+VerseModule "util.hashes" "libs/hashes.lua"
+VerseModule "util.table" "libs/table.lua"
+VerseModule "util.vcard" "util/vcard.lua"
 
-VerseModule "verse.server" "server.lua"
+VerseModule "server" "server.lua"
 
 -- SASL client mechanisms	
-VerseModule "verse.util.sasl.scram" "util/sasl/scram.lua"
-VerseModule "verse.util.sasl.plain" "util/sasl/plain.lua"
-VerseModule "verse.util.sasl.anonymous" "util/sasl/anonymous.lua"
-VerseModule "verse.util.sasl.oauthbearer" "util/sasl/oauthbearer.lua"
+VerseModule "util.sasl.scram" "util/sasl/scram.lua"
+VerseModule "util.sasl.plain" "util/sasl/plain.lua"
+VerseModule "util.sasl.anonymous" "util/sasl/anonymous.lua"
+VerseModule "util.sasl.oauthbearer" "util/sasl/oauthbearer.lua"
 
-VerseModule "verse.client" "client.lua"
-VerseModule "verse.component" "component.lua"
-VerseModule "verse.bosh" "bosh.lua"
+VerseModule "client" "client.lua"
+VerseModule "component" "component.lua"
+VerseModule "bosh" "bosh.lua"
 
 if GetOption "internal-bit-module" then
 	Module "bit" "libs/bit.lua"