Next up in the quest to understand and specify how defaults work / should work is the support to set class parameters via the resource default expression.

You can do this, to set defaults on classes

     class a ($x) {
      notice "The x is $x"
     }
     Class { x => 'the default' }
     include a

The output is "The x is the default"

This is a very blunt instrument as it is not possible to define the defaults for a particular class. And (drumroll), it is almost useless as the parameters specified must be parameters that exist in *all classes*.

The only possible meaningful use of this is to set meta parameters such as `audit`, or `loglevel` on every class.

Can we remove this support?

If there are reasons to keep it, can we specify it so that it is only allowed to do this for meta parameters? (We can then statically validate this and give errors at parse time as opposed to runtime when
a default expression may be conditionally evaluated and blow things up
under certain conditions).

- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/lp6ef8%247rs%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to