Advertisement
alestane

Simple file executor

Feb 9th, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.22 KB | None | 0 0
  1. function run(name, ...)
  2.     for _, seeker in ipairs(package.loaders) do
  3.         local chapter = seeker(name)
  4.         if type(chapter) == 'function' then
  5.             return chapter(...)
  6.         end
  7.     end
  8.     error("no code body '"..name.."' was found.")
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement