[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



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:

var = "value"

{ "A": message => "$var", }

# works
notify { "B": message => "${var}", } # works

{ "C": message => $var, }

# works
notify { "D": message => ${var}, } # fails, with Error 400 on SERVER: Could not match '${var},' at <filename>:<line>

It would be nice if ${var} could be used in this context.

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:


Generated at Fri Aug 07 09:06:26 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.