Issue #5042 has been updated by Joshua Lifton.

Assignee deleted (Paul Berry)

This issue was assigned to a former Puppet Labs employee. Adding back to the 
pool of unreviewed issues.
----------------------------------------
Bug #5042: Node declarations shouldn't be allowed inside classes
https://projects.puppetlabs.com/issues/5042

Author: Paul Berry
Status: Accepted
Priority: Normal
Assignee: 
Category: language
Target version: 
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 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.

Reply via email to