lua-users home
lua-l archive

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


Hi,

I agree IPL is complicated. But how about Adrian's solution?

   require"a.b.c.d"
   try a.b.c.d
   if not found, implicitly require"a.b.c.xxx"
   try preload a.b.c.d
   if not found, implicitly require"a.b.xxx"
   try preload a.b.c.d
   if not found, implicitly require"a.xxx"
   try preload a.b.c.d
   if not found, implicitly require"xxx"
   try preload a.b.c.d

It's an optimized mix of the fixed name idea with Doug's "go up on
failure and retry" approach.

[]s,
Diego.