What I have done in some of my modules is to make them
return two values. Then `require "mymod"` only accesses the
public part, but `mymod, private = dofile"mymod.lua"` also
returns a table containing some local functions, cached
while they were visible. Then `lunit` or a similar tool can test
`mymod`, and some special-purpose tool that I have control
over can test `private`.