Issue #16221 has been updated by eric sorenson. Affected Puppet version deleted (3.0.0-rc5)
Friends -- As of 30da528e9c8ac345d1020d1cbeee02598174a3c5 we put this intentionally back to the 2.7 behaviour. Because both (a) the change crept in as a side-effect of other code changes, not as a deliberate language design choice -and- (b) we are not providing a simple (sigil or keyword) workaround for people to preserve the behaviour they've written around. are true here, I'm convinced it's not a good change. After this commit, the sample code in Erik's update 1 works as expected, as do the other cases I'm able to test. Thanks for your feedback. ---------------------------------------- Bug #16221: Passing undef as argument to classes & defines overrides default parameter https://projects.puppetlabs.com/issues/16221#change-71694 Author: Erik Dalén Status: Closed Priority: Normal Assignee: eric sorenson Category: Target version: 3.0.0 Affected Puppet version: Keywords: parameter undef Branch: In puppet 3.0.0-rc5 the default value is overridden if I pass undef as a parameter to a define or class. Example: define bar ($param='Hello world') { notice($param) } define foo ($param=undef) { bar { 'bartest': param => $param } } foo { 'footest': } In puppet 2.7.19 that outputs: notice: Scope(Bar[bartest]): Hello world But in puppet 3.0.0-rc5 I get: Scope(Bar[test]): -- 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.
