Issue #5074 has been updated by Markus Roberts.

Status changed from Re-opened to Accepted


----------------------------------------
Bug #5074: declaring a parameterized class does not make its enclosed variables 
accessible
https://projects.puppetlabs.com/issues/5074

Author: Dan Bode
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 2.6.3rc1
Keywords: include class parameterized scope
Branch: 


The following code
<pre>
class { 'motd':
  override_data => 'override'
}
notice($motd::override_data)
</pre>
results in:
<pre>
warning: Scope(Class[main]): Could not look up qualified variable 
'motd::override_data'; class motd has not been evaluated
notice: Scope(Class[main]):
</pre>

I can fix this, by putting an include before I want to use the qualified 
variable.

<pre>
class { 'motd':
  override_data => 'override'
}
include motd
notice($motd::local_var)
</pre>

<pre>
notice: Scope(Class[main]): override
</pre>





-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to