[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: require() relative to calling file
- From: Martin <eden_martin_fuhrspam@...>
- Date: Sun, 5 Feb 2017 17:10:02 -0800
On 02/05/2017 03:42 AM, Daurnimator wrote:
> Back when I was first starting with lua, I did find myself wanting
> relative require.
> However as time has gone on I wanted it less and less, and now don't
> have any desire for it at all.
>
> I think the main desire for a relative require was a reluctance to
> name my projects while I was working on them.
> If I had a sub-module 'foo' that relied on a sub-module "bar", I'd
> have to name the whole project!
Me too. But I've implemented relative require for myself. And I still
cant accept need for absolute path when one module deep in file tree
calls neighbor module. It's like calling wife something like
"USA.Denver.Susan.D.Totten" with obvious need to change this name when
your family relocates, not only when you changes wife.
-- Martin
- References:
- require() relative to calling file, tobias
- Re: require() relative to calling file, Sean Conner
- Re: require() relative to calling file, Russell Haley
- Re: require() relative to calling file, Scott Morgan
- Re: require() relative to calling file, Russell Haley
- Re: require() relative to calling file, Sean Conner
- Re: require() relative to calling file, Russell Haley
- Re: require() relative to calling file, Sean Conner
- Re: require() relative to calling file, Russell Haley
- Re: require() relative to calling file, Sean Conner
- Re: require() relative to calling file, Daurnimator