Issue #22913 has been reported by Daniele Sluijters.

----------------------------------------
Bug #22913: type or class parameters shouldn't automatically map to identically 
named metaparameters
https://projects.puppetlabs.com/issues/22913

* Author: Daniele Sluijters
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
In puppet, when you declare a class or type with a parameter that happens to be 
identically named to a metaparameter the value of your parameter becomes the 
value of the metaparameter and is applied to every contained resource.

This currently means that with something like this:
class foo (
  $require => undef,
) { .. }

Every resource in foo will get a 'require => undef,' thrown on to it for good 
measure.

I think this is a terrible feature, ripe for immense confusion and abuse. I'd 
argue that parameters should not be allowed, by the parser, to have the same 
name as a metaparameter to avoid this scenario or not have it automatically map 
on the metaparameter so you have to explicitly do 'require => $require' instead.


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to