# File lib/rcodeleveler.rb, line 427
def requireLevel(iLibraryName)
  # Do not process if it was already done (check in $" variable)

  lExtension = File.extname(iLibraryName)
  if (lExtension == '')
    lFileNameWithExt = "#{iLibraryName}.rb"
  else
    lFileNameWithExt = iLibraryName
  end
  if ($".index(lFileNameWithExt) == nil)
    # Get the real location

    lRealFileName = RCodeLeveler::getRealLibraryPath(iLibraryName)
    if (lRealFileName != nil)
      # Avoid further parsing of this file with require or requireLevel

      $" << lFileNameWithExt
      lSourceCode, lDifferent = RCodeLeveler::getSourceFileContentLevelized(lRealFileName)
      # Uncomment to dump the file being really evaluated to stdout.

      #puts '======================================================================='

      #puts '======================================================================='

      #puts lRealFileName

      #puts '======================================================================='

      #puts '======================================================================='

      #puts lSourceCode.join('')

      # And now eval the code

      eval "#{lSourceCode.join('')}", nil, lRealFileName
    else
      # Dump error

      lDirList = $:.join(', ')
      raise LoadError, "Unable to find file #{iLibraryName}. List of directories searched: #{lDirList}. Please use requireLevel with Ruby source files only."
    end
  end
end