439 print("# Lua module versions"); |
439 print("# Lua module versions"); |
440 local module_versions, longest_name = {}, 8; |
440 local module_versions, longest_name = {}, 8; |
441 local library_versions = {}; |
441 local library_versions = {}; |
442 dependencies.softreq"ssl"; |
442 dependencies.softreq"ssl"; |
443 dependencies.softreq"DBI"; |
443 dependencies.softreq"DBI"; |
|
444 local friendly_names = { |
|
445 DBI = "LuaDBI"; |
|
446 lfs = "LuaFileSystem"; |
|
447 lunbound = "luaunbound"; |
|
448 lxp = "LuaExpat"; |
|
449 socket = "LuaSocket"; |
|
450 ssl = "LuaSec"; |
|
451 }; |
444 local lunbound = dependencies.softreq"lunbound"; |
452 local lunbound = dependencies.softreq"lunbound"; |
445 for name, module in pairs(package.loaded) do |
453 for name, module in pairs(package.loaded) do |
446 if type(module) == "table" and rawget(module, "_VERSION") |
454 if type(module) == "table" and rawget(module, "_VERSION") |
447 and name ~= "_G" and not name:match("%.") then |
455 and name ~= "_G" and not name:match("%.") then |
|
456 name = friendly_names[name] or name; |
448 if #name > longest_name then |
457 if #name > longest_name then |
449 longest_name = #name; |
458 longest_name = #name; |
450 end |
459 end |
451 module_versions[name] = module._VERSION; |
460 module_versions[name] = module._VERSION; |
452 end |
461 end |