 #
 # Provides the basic methods needed to load packages and any functions
 # useful enough to live in the core.
-#
-# NOTE: Much of the package stuff is drawn from Dojo, which is a project
-# that is arguably over-engineered and generally stuffy, but hopefully
-# taking a small slice out of it will not spread the seeds of doom.
 #
 
 if window? and not GLOBAL?

  #   # looks for files in this order:
  #   # wesabe/math/vector.js
  #   # wesabe/math.js
  #   # wesabe/math/__package__.js
  #   wesabe.require("math.vector");
  #
  #   # specifying an asterisk last changes the order:
  #   # wesabe/math/vector/__package__.js
  #   # wesabe/math/vector.js
  #   # wesabe/math.js
  #   # wesabe/math/__package__.js
  #
  require: (module) ->
    return required[module].exports if required[module]

    if parts.length is 0
      return []

    uris = []

    # A/B/C.{js,coffee}
    uris = u(parts).concat(uris)

    # start over with A/B
    uris.concat(wesabe._getUrisForParts(parts[0...parts.length-1], scheme))

  #
  # Loads (and evals) the JS file at +uri+. Returns true on success.
