code: function _eval(func, data, vars, relPath, partial) {
    /*jshint noempty: false */
    if (vars) {
      
      var appPartials = app.views.partials, 
          async = this.async,
          partials;
      
      // Add partials as helpers for all engines
      for (var f in appPartials) {
        if (async) {
          // Async engines need to make the helpers compatible with their asynchronous model
          vars[f] = this.makePartialAsync(appPartials[f]);
        } else {
          f = appPartials[f];
          if (f.async) {
            // Ignore async partials for sync engines
            // app.debug('Ignoring ' + f.id + ' partial on ' + vars.res.engine.constructor.name + ' engine (not asynchronous)');
          } else {
            // Sync engines only support sync partials
            vars[f.id] = f;
          }
        }
      }
      
      // Rendering a template
      var res = vars.res;
      
      try {
        if (res.engine.async) {
          // Render asynchronous template
          func(vars, function(err, buffer) {
            if (buffer && buffer instanceof String) buffer = buffer.toString();
            res.emit('__async_template_done', err || buffer);
          });
        } else {
          // Render normal template
          if (typeof func == 'function') {
            // Specify extra partial arguments for the engines that need it
            if (partial) {
              // call rendering function with partials
              var args = this.returnPartials();
              if (isArray(args)) {
                return func.apply(null, [vars].concat(args));
              } else {
                return func(vars, args);
              }
              
            } else {
              // call rendering function normally
              return func(vars); 
            }
          } else {
            return func;
          }
        }
      } catch (e) {
        return e;
      }
    } else {
      // Rendering a partial, just return the function
      return func;
    }
  }
docs: /*
  Renders the evaluated template buffer.
  
  If there`s an error, an exception will be returned otherwise.
  
  @private
  @param {function} func
  @param {string} data
  @param {object} vars
  @param {string} relPath
  @return {function}