Issue #4536 has been updated by R.I. Pienaar aka Volcane.
I think #4370 may have sorted this out ---------------------------------------- Refactor #4536: scope.lookupvar should return a clone of the object, not the object itself http://projects.puppetlabs.com/issues/4536 Author: Daniel Pittman Status: Needs design decision Priority: High Assigned to: Category: functions Target version: Affected version: 2.6.1rc2 Branch: At present this code will destroy the content of a puppet variable: $foo = [1, 2] notice("bar is $bar") # 'bar is 12' $bar = inline_template('<% foo.shift %>') notice("bar is $bar") # 'bar is 2' 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.
