docs/example.lua: Don't depend on 'verse' being a global

Thu, 22 Oct 2020 15:27:48 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 22 Oct 2020 15:27:48 +0100
changeset 433
5c77923ec1d9
parent 432
07a0f9f2e69d
child 434
4300839a28ca

docs/example.lua: Don't depend on 'verse' being a global

doc/example.lua file | annotate | diff | comparison | revisions
--- a/doc/example.lua	Thu Oct 22 15:27:22 2020 +0100
+++ b/doc/example.lua	Thu Oct 22 15:27:48 2020 +0100
@@ -5,7 +5,7 @@
 -- handy if you're hacking on Verse itself
 --os.execute("squish --minify-level=none verse");
 
-require "verse".init("client");
+local verse = require "verse".init("client");
 
 c = verse.new();
 c:add_plugin("version");

mercurial