Issue #21508 has been updated by eric sorenson.

Status changed from Unreviewed to Investigating
Assignee set to Henrik Lindberg

Henrik -- I confirmed this but I'm not sure whether it's intentional or not.  
The docs say:

<blockquote>
When a lambda is evaluated, this takes place in a local scope that shadows 
outer scopes. Each invocation of a lambda sets up a fresh local scope. The 
variables assigned (and the lambda parameters) are immutable once assigned, and 
they can not be referenced from code outside of the lambda block. The lambda 
block may however use variables visible in the scope where the lambda is given, 
as in this example...
</blockquote>

But in this case, the template access is _inside_ the lambda block. 

I have a minimalistic reproduction case here: [Gist 
5881061](https://gist.github.com/ahpook/5881061)

----------------------------------------
Bug #21508: Can't access a lambda variable in a template (Future Parser)
https://projects.puppetlabs.com/issues/21508#change-93783

* Author: Kit Plummer
* Status: Investigating
* Priority: Normal
* Assignee: Henrik Lindberg
* Category: 
* Target version: 
* Affected Puppet version: 3.2.2
* Keywords: future parser
* Branch: 
----------------------------------------
https://gist.github.com/kitplummer/5877926

Doesn't work: <% @value %>
Does work: <%= scope.lookupvar('value') %>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to