manoelcampos / xml2lua

XML Parser written entirely in Lua that works for Lua 5.1+. Convert XML to and from Lua Tables 🌖💱
MIT License
287 stars 73 forks source link

Introduce a way to check module's version in runtime #54

Closed lemniscati closed 3 years ago

lemniscati commented 3 years ago

Thank you for development.

It would be happy for me if we can check a version of the module in runtime, in a way like:

m = require("xml2lua")
print ( m._VERSION )

cf. http://lua-users.org/wiki/ModuleVersioning

Regards, Lem

manoelcampos commented 3 years ago

Hello @lemniscati I've just made the changes you suggested. The code will work exactly as you showed. Check the new 1.4-5 version.

Thanks for contributing.