[PUP-3385] Allow ${var} with curlies everywhere Created: 2014/10/03  Updated: 2014/10/06  Resolved: 2014/10/06

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Normal
Reporter: redmine.exporter Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: redmine
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:

 Description   

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.



 Comments   
Comment by Charlie Sharpsteen [ 2014/10/06 ]

Marking this as "won't fix" given that the discussion on Redmine indicated a lack of support for making this change to the language. The discussion thread ended 2 years ago without the emergence of any arguments in support of the proposed change. The current specification for the Puppet Language does not support the use of ${} outside of string interpolation.

Discussion of Puppet Language semantics is welcomed and encouraged. The puppet-developers mailing list is the best forum for discussing changes of this nature:

https://groups.google.com/forum/#!forum/puppet-dev

Generated at Thu Nov 14 10:50:46 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.