Issue #5042 has been updated by Michael Stahnke.

Description updated
Status changed from Unreviewed to Accepted
Assignee set to Daniel Pittman
Target version set to Telly

This goes along with some plans to deprecate node in Telly. 
----------------------------------------
Bug #5042: Node declarations shouldn't be allowed inside classes
https://projects.puppetlabs.com/issues/5042

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