Issue #3987 has been updated by Andrew Parker.
I don't think this should be added to the puppet language as it would, in the form suggested, be yet another syntax to remember that doesn't mean anything different from the same expression without the curly braces. The ability to use curly braces around variables outside of strings for interpolation seems to come from the Perl and shell languages where the braces serve another purpose. Bash uses the curly brace syntax for all sorts of in-place expansions of a variable (see http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion) and Perl uses them for casting and symbolic references. ---------------------------------------- Feature #3987: Allow ${var} with curlies everywhere https://projects.puppetlabs.com/issues/3987#change-58773 Author: Alan Barrett Status: Accepted Priority: Normal Assignee: Randall Hansen Category: parser Target version: Telly Affected Puppet version: 0.25.5 Keywords: usability Branch: Inside quoted strings, variables may be written as "$var" or "${var}", but outside quoted strings, the $var form is required, and attempts to use ${var} result in confusing error messages: <pre> var = "value" notify { "A": message => "$var", } # works notify { "B": message => "${var}", } # works notify { "C": message => $var, } # works notify { "D": message => ${var}, } # fails, with Error 400 on SERVER: Could not match '${var},' at <filename>:<line> </pre> It would be nice if ${var} could be used in this context. -- 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.
