lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi all.

I'm using Lua in the OpenVMS operating system. However I'm getting trouble to use 'require' because I can't see a way to create file paths from module names by simply replacing of the '.' character. Even composing the full module file path from the 'package.path' by simple replacement of the '?' character seems to be impossible.

I'm not a VMS expert but as far as I know a simplified description of VMS file paths is that they are made of a list of nested directory names given between square brackets and separated by dotches and the file name is appended to its end. For example the equivalent of the unix path 'lualibs/share/5.1/lua/package/module.lua' would be something like '[.LUALIBS.SHARE.5.1.LUA.PACKAGE]MODULE.LUA'. The first dotch after the opening square bracket indicates a relative path. The directory '5.1' became two nested directories because directory names cannot have a dotch.

So my questions are: (a) has any one made any adjustments in the package model implementation to fit the VMS environment? (b) What would be the proper way to do it? Does Lua source code provides any support or trick to deal with such odd situation? Or should I better add some #ifdef VMS directives and provide a VMS specific 'findfile' implementation?


Renato Maia
PhD student at PUC-Rio