Issue #6621 has been updated by Nigel Kersten.
Oliver Hookins wrote: > "undef" has a certain meaning in Puppet, but then for example in a template > it is just a normal string. Sure you can handle it specially, but that feels > a bit of a hack. I guess in an ideal world we'd just have nil, but given that > Puppet uses undef for roughly the same meaning, maybe translating Puppet > values of undef to Ruby nils and vice versa might make some sense (from a > semantic point of view at least). We need to sort out the mess of undef in templates, yes. My question to you all is whether you feel we can safely do this in the 2.7.x series, or whether that's too much of a behavior change, and we'll need to wait for 2.8.0 ? ---------------------------------------- Feature #6621: Provide a nil type in the Puppet language https://projects.puppetlabs.com/issues/6621 Author: Oliver Hookins Status: Rejected Priority: Normal Assignee: Category: Target version: Affected Puppet version: 2.6.5 Keywords: Branch: Currently there is no way to semantically convey the concept of nil, as Ruby understands it. nil currently evaluates to true and is internally converted to a string 'nil', and '' evaluates (somewhat confusingly) to false. However, the empty string is a permissible configuration value whereas nil inherently is not. Furthermore non-empty strings evaluate to true unlike the empty string. My use case, to put it very simply, is to work around some limitations of communicating information between the external node classifier interface and Puppet itself, since once you pass a nil value through the interface to Puppet, nil loses its semantic value. -- 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.
