From: unexist Date: 2010-10-27T06:41:00+09:00 Subject: Re: require in instance_eval ---- On Tue, 26 Oct 2010 23:06:40 +0200 Jeremy Bopp wrote ---- >It would seem so, but you need to take care with that since your users >may still expect to use require to load other extensions. Yep true, the point is I never encouraged users to use this, I don't even use it myself and now I need to face them with this kind of regress in their opinion. >Maybe your DSL can provide an alternative to require that does what you >want while leaving require alone. It would break compatibility with >some existing configurations that use require and require_relative, but >you could have a deprecation period where using those methods would >produce a warning and then fall back to the DSL's alternative. Hm good I idea, I will think about it. Most likely I will just keep it as is, because the DSL is that easy breaking it apart has almost no benefits. >I wonder if the inability to use require_relative from within an eval >should be considered a bug. Maybe require_relative should support an >argument for an explicit basepath, at least as a workaround. Either that or a way to set the basepath directly in this cases. *eval should be aware where the stuff came from. The current "(eval)" is probably a good default for meaningful error messages. With best regards Christoph