Issue #21198 has been updated by Andrew Parker.

Merged into master in 
[d6fce02](https://github.com/puppetlabs/puppet/commit/d6fce029f8d21f4e2cfb0ecacf61f482f808577a)

----------------------------------------
Bug #21198: hiera calling_module / calling_class not set for automatic 
parameter lookups
https://projects.puppetlabs.com/issues/21198#change-98369

* Author: Robert Frank
* Status: Merged - Pending Release
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 3.4.0
* Affected Puppet version: 3.0.0
* Keywords: 
* Branch: https://github.com/puppetlabs/puppet/pull/1913
----------------------------------------
The automatic parameter lookup uses a different scope (Puppet::DataBinding) 
than the explicit lookup with the hiera function (Hiera::Scope). The 
calling_module and calling_class variables are generated in Hiera::Scope and 
therefore are not available when automatic parameter lookup is used. This 
breaks hiera configurations that make use of those variables for lookups.
Including the following class in a node definition on a puppet master
<pre>
class test($myopt = 'default') {
  notify { "auto myopt: ${myopt}": }
  $myvar = hiera('test::myopt', $myopt)
  notify { "hiera myopt: ${myvar}": }
}
</pre>
with a hiera configuration that uses
<pre>
- %{calling_module}
- common
</pre>
and different configuration values for test::myopt in test.yaml and common.yaml 
prints the value defined in test.yaml for the explicit lookup and the value 
defined in common.yaml for the automatic lookup.



-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
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