On 2014-19-03 18:20, Erik Dalén wrote:
On 19 Mar 2014 18:11, "Henrik Lindberg" <henrik.lindb...@cloudsmith.com <mailto:henrik.lindb...@cloudsmith.com>> wrote: > > On 2014-19-03 17:26, Erik Dalén wrote: >> >> >> Also IMO it would be really good if support for doing the stuff in >> https://tickets.puppetlabs.com/browse/PUP-1985 could be added. Basing >> default values of parameters on the values of earlier parameters. >> >> Atm you are forced to do the ugly kind of stuff that the style guide >> recommends with $real_foo variables (puppet <2.6.2 style): >> http://puppet-lint.com/checks/class_parameter_defaults/ >> > > This is somewhat tricky, but we could possibly achieve this by processing parameters from left to right even if the values given to it are given in a Hash (which potentially is unordered). > > We should also only accept variable references to parameters to the left of where it is used, or using global variables, anything else is a grey-zone (are they evaluated in the caller's scope? or some other scope?). > Those seem like very reasonable limitations (unless we allow variables in any order everywhere ofc). Any absolute references to variables in classes that have already been parsed should also be allowed.
Yes, anything that is externally referenced. (i.e. evaluated and available via a fully qualified name).
- henrik -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/lgck7i%24ho5%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.