Issue #1198 has been updated by eric sorenson. Assignee set to eric sorenson Priority changed from Low to Normal Target version set to 3.x Keywords set to customer
Lots of requests for 'strict' mode aggregated here, which should be easier with the Puppet 3.2 expression parser. ---------------------------------------- Feature #1198: alter parser to throw an error on use of an undefined, unquoted, variable. https://projects.puppetlabs.com/issues/1198#change-91763 * Author: Mike Pountney * Status: Accepted * Priority: Normal * Assignee: eric sorenson * Category: language * Target version: 3.x * Affected Puppet version: 0.25.4 * Keywords: customer * Branch: ---------------------------------------- Currently, the parser treats the following cases as equivalent: <pre> file {"/tmp/testfile": content => $content } file {"/tmp/testfile": content => "$content" } </pre> I think it would be beneficial to throw a compile error in the first case if $content is not defined, eg fail('Attempt to use unquoted, undefined variable $content'). This would sensibly catch many cases where I have: * typo'd on variable names, * misjudged scoping, * forgotten to define a variable that I am using in a defined type, * broken a facter fact. The second form provides a means for people to continue with the current logic of 'all variables are an empty string if undefined' for such things as 'if "$myvar"' statements. Anyway, please feel free to tell me that this ain't gonna happen, just wanted to throw it out there... -- 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.
