lua-users home
lua-l archive

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


> > require"foo.bar" works as usual; but if "foo.bar" doesn't exist then try 
> > to require"foo" before failing.
> 
> Just out of curiosity, what's wrong with Javier's proposal? It seems 
> pretty simple and feasible to me.

Among other problems you mix two things - hierarchies and fail recover.
For instance, if foo.bar fails because the file isn't there, foo may yet
succeed. So require "foo.bar" succeeds without loading foo.bar...

-- Roberto