Issue #4536 has been updated by Nigel Kersten. Target version set to Telly
---------------------------------------- Refactor #4536: scope.lookupvar should return a clone of the object, not the object itself https://projects.puppetlabs.com/issues/4536 Author: Daniel Pittman Status: Accepted Priority: Low Assignee: Category: functions Target version: Telly Affected Puppet version: 0.25.5 Keywords: Branch: At present this code will destroy the content of a puppet variable: <pre> $bar = [1,2] notice("bar is $bar") # 'bar is 12' $foo = inline_template('<% bar.shift%>') notice("bar is $bar") # 'bar is 2' </pre> This is certainly surprising behaviour, and it means that it is relatively easy to destroy the content of a puppet variable from a template. This would probably be better returning a clone of the object so, at least, that the most obvious top level actions don't destroy the content so easily. Perhaps even a dclone is appropriate... -- 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.
