From: Zev Blut Date: 2005-02-21T19:42:02+09:00 Subject: Re: Require when Executed file is required by another file. Hello, On Sat, 19 Feb 2005 15:19:59 +0900, Gennady Bystritsky wrote: > In general, it is very hard and time consuming to determine that > different paths refer to the same file, so require does not even try to > pretend that it is robust. It certainly appears to be a bit tricky. Although, it would be nice if the executed program was added to $" so that it could prevent being required again. > Knowing how require works, you can easily implement some work around for > your particular case. The solution for the day is probably that my colleagues and I need to make all executable programs thin wrappers that only require the main code and implement the __FILE__ == $0 logic. Best, Zev