Issue #9518 has been updated by Charlie Sharpsteen. Keywords changed from goalie_06_28_2012 to goalie_06_28_2012 customer
---------------------------------------- Bug #9518: Array scope different from string scope: https://projects.puppetlabs.com/issues/9518#change-88595 * Author: Zach Leslie * Status: Closed * Priority: Normal * Assignee: Andrew Parker * Category: language * Target version: 3.0.0 * Affected Puppet version: 2.7.1 * Keywords: goalie_06_28_2012 customer * Branch: ---------------------------------------- The following code: <pre> $var=["top"] class test1 { $var+=["test1"] } class test2 { $var+=["test2"] notice("Top: $::var Test1: ${test1::var} Test2: ${test2::var}") } class{ "test1": } class{ "test2": } </pre> produces: <pre> notice: Scope(Class[Test2]): Top: top Test1: toptest1 Test2: toptest2 </pre> If the array is changed to a string as such: <pre> $var="top" class test1 { $var+="test1" } class test2 { $var+="test2" notice("Top: $::var Test1: ${test1::var} Test2: ${test2::var}") } class{ "test1": } class{ "test2": } </pre> The behavior changes. <pre> notice: Scope(Class[Test2]): Top: toptest1test2 Test1: toptest1test2 Test2: toptest1test2 </pre> This appears to be inconsistent scoping and should be fixed. I've been informed that its been around for a long time. Tested on 2.7.1 and 2.7.4. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
