On 05/26/2014 06:40 PM, Fabrice Bacchella wrote: > Is that normal that params1 is part of the context in both case, but not > param2 ?
Ugh. Scope semantics. It *does* seem a little weird. Here's my take: 1. $param1 is a local variable (a parameter) of myclass 2. Mytpe[mytype] is scoped into myclass 3. Mysubtype[/tmp/parsed1] is inheriting this scope from its enclosing defined type I will have to assume that defined types don't incur another level of scoping of their own. Then it kind of makes sense. > I think the value of 'title' and name disturbing too. It should be either > mysubtype and mytype or /tmp/parsed1 and /tmp/parsed2. But no a strange mix > of both. Uhm, no. Your template is evaluated from inside these defined type instances: Mytpe[mytype] Mysubtype[/tmp/parsed1] Therefor $name and $title *must* take the values 'mytype' and '/tmp/parsed1' respectively. Anything else would be quite inconsistent. HTH, Felix -- 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/53847CB0.3080509%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout.
