On Apr 17, 2012, at 9:00 AM, Andrew Parker wrote:
> Has anyone seen something where a manifest used $::var in order to *not* get 
> the value of $var that is overridden in a node?

Uh… I use it extensively.

>> At the moment (and under the new regime)
>> 
>>   $var = "top scope"
>>   node default { 
>>     $var = "node"
>>     include foo
>>   }
>>   class foo {
>>     notify { "which is it?": message => $var }
>>   }
>> 
>> $var is going to evaluate to "node". If you change that to $::var, then 
>> you'll end up with "top scope". This doesn't seem right

Why not? This makes perfect sense to me.  Unless I am totally misunderstanding 
something, I truly can't fathom why this isn't bad.

In fact, I'd prefer stricter lexical scoping rather than vaguer. I believe that 
the current situation is what confuses everyone, and that if referencing 
something out of scope was ALWAYS explicit that would be preferred.  I'd also 
prefer tighter scoping around each node -- I could simplify a lot of code if 
this worked better, such that I could use node variables within parameterized 
classes easily, always being set for the node currently being operated on.

-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other 
randomness

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en.

Reply via email to