On Mon, Aug 20, 2012 at 1:33 PM, Tim Mooney <tim.moo...@ndsu.edu> wrote:
> In regard to: Re: [Puppet Users] Dynamic Lookup of facter variable.,
> Nigel...:
>
>
>> On Sun, Aug 19, 2012 at 8:00 PM, Douglas Garstang
>> <doug.garst...@gmail.com> wrote:
>>>
>>> Oh god that's ugly.
>>
>>
>> Yes it is, and it was an unwitting bug with the deprecation warning
>> that is resolved in later versions.
>>
>> Facts were supposed to be able to be referenced as $factname without
>> throwing the deprecation warning in your release, it's been fixed in
>> later versions.
>
>
> Can you expound on this, Nigel?
>
> Are you saying that we do *not* need to reference facts as $::factname
> in all our classes, not even in preparation for puppet 3.x?  What if
> we *are* referencing them that way, now?

There's no harm in going that extra mile and being explicit that
you're looking at a top scope variable fact, rather than a local
variable of the same name, so you can continue to reference them as
$::factname if you would like to do so.

Requiring that wasn't an original goal, as it was deemed too high a
cost for the most common case to force that rather ugly syntax on
everyone. It was a bug in the deprecation warning code.

Does that help?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to