On 5/6/06, Leslie Viljoen <leslieviljoen / gmail.com> wrote:
> The other thing is that a gem or library should not be loaded unless I
> "require" it. This was the Glue problem. So unless I say "require",
> what is not listed in the "built in classes and modules" part of the
> Ruby manual should not be part of my environment.

This is already the way it is done. No libraries are loaded until
required. Not even from the standard library. The only ones there
without an explicit require are the core libraries. (Standard library
only means that the library is always *present*, ready to be required,
without you needing to install anything -- unless you're on some older
flavors of debian/ubuntu).

If the library's being loaded, it's because *someone* is requiring it.
Obviously, in the case mentioned, it wasn't the end user; not
directly, anyways. But some library the *was* included directly was
including Glue *for* them. Probably with some fancy logic that says,
"Well, if Glue's not available, we can do it ourself, no need to make
them install it... but if Glue *is* available, let's use it!" So the
application worked without Glue being installed, but as soon as Glue
was installed, it got required into the project automatically. Not
because Ruby sucked it in automatically, but because some other
library did.

Jacob Fugal