@all, thanks :)
Le 10/03/2017 à 14:10, R.I.Pienaar a écrit :
On Fri, Mar 10, 2017, at 14:06, Dirk Heinrichs wrote:
Am 10.03.2017 um 14:02 schrieb R.I.Pienaar:
the first is just wrong
OTOH, I mostly use $::facts['fact_name'].
this is not needed.
The reason you use $::foo is because of the problem here:
$foo = "top"
class x($foo="class") {
notice($foo)
notice($::foo)
}
include x
this produce:
Notice: Scope(Class[X]): class
Notice: Scope(Class[X]): top
you need to guard against the accidental $foo which used to be much
worse with dynamic scope, so the code got littered with all this ::
rubbish.
$facts is globally reserved
class x {
$facts = {}
}
include x
Error: Evaluation Error: Error while evaluating a '=' expression,
Attempt to assign to a reserved variable name: 'facts'
You can never cause the problem that raised the need for $::facts to
exist, you can just use $facts and it's all sweet and
In general with Puppet 4 the needs for all the :: stuff is almost all
gone
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/d9f72063-37a3-9cbd-679d-161e8ab9e90e%40quake.fr.
For more options, visit https://groups.google.com/d/optout.