Issue #3300 has been updated by Luke Kanies. Assigned to changed from Luke Kanies to Markus Roberts
How will this be affected by futures? ---------------------------------------- Feature #3300: appending to variables already defined in this scope http://projects.puppetlabs.com/issues/3300 Author: Xavier Delaruelle Status: Needs design decision Priority: Normal Assigned to: Markus Roberts Category: parser Target version: Affected version: 0.25.4 Keywords: Branch: Hello, As mentioned in the doc, it is possible since 0.24.6 to append to variables already defined in a different scope. But when appending to a variable already defined in the scope, like in the following example: `define foo ($val) { $bar = [ 'val1', 'val2' ] if $val != '' { $bar += [ $val ] } }` puppet returns the following error: `Cannot append, variable bar is defined in this scope at /tmp/test.pp:8 on node host` Appending to variables already defined in the scope could be useful when we want to adapt the behavior of a class or a define depending of variable values. Regards, Xavier -- 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.
