Issue #5042 has been updated by Daniel Pittman. Assignee deleted (Daniel Pittman)
---------------------------------------- Bug #5042: Node declarations shouldn't be allowed inside classes https://projects.puppetlabs.com/issues/5042#change-92396 * Author: Paul Berry * Status: Accepted * Priority: Normal * Assignee: * Category: language * Target version: 3.x * Affected Puppet version: * Keywords: * Branch: ---------------------------------------- Puppet currently allows a node to be declared inside a class. For example: <pre> class foo { node bar { notice("hello") } } </pre> This is confusing because it makes it look like the node being defined is called "foo::bar", when in fact it is simply "bar". There's no good reason why a user should need to nest a node inside a class, and the presence of this unnecessary "feature" is complicating my efforts to make improvements in autoloading (e.g. feature #5041). I propose to modify the Puppet language so that all node declarations would have to be at toplevel, and the above example would be classified as a syntax error. -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
