title: Need Groovy syntax help for generating a Closure from a String
body: <p>I'm trying to generate a closure from a string.  The code inside the closure references a DSL function build().  The errors I'm getting imply that Groovy is trying to execute the closure instead of just declaring it. What is the correct syntax for this?  Here are some of the constructs I have already tried.</p>
  
  <pre><code>sh = new GroovyShell() 
  cl = sh.evaluate( '{ build("my job") }' } 
  =&gt; Ambiguous expression could be either a parameterless closure expression or an isolated open code block;
  
  sh = new GroovyShell() 
  cl = sh.evaluate( 'L: { build("my job") }' } 
  =&gt; No signature of method: Script1.build() is applicable ...
  
  cl = Eval.me( 'L: { build("my job") }' } 
  =&gt; No signature of method: Script1.build() is applicable ...
  
  cl = Eval.me( 'L: { com.flow.FlowDelegate.build("my job") }' } 
  =&gt; No such property: com for class: Script1
  </code></pre>
  
  <p>The example I'm trying to follow comes from: 
  <a href="https://stackoverflow.com/questions/6129067/load-closure-code-from-string-in-groovy">Load closure code from string in Groovy</a></p>