Issue #3571 has been updated by Luke Kanies.

Status changed from Needs design decision to Accepted

I say we modify it to allow it to require any resource type, but consider a 
plain string to be syntactical sugar for a class, with no deprecation.

Seem reasonable? Or should we force the resource reference?
----------------------------------------
Bug #3571: "require" function is named badly.
http://projects.puppetlabs.com/issues/3571

Author: Nigel Kersten
Status: Accepted
Priority: Normal
Assigned to: Brice Figureau
Category: functions
Target version: 
Affected version: 0.25.4
Keywords: 
Branch: 


The require function only works with classes.

It should be called "require_class" in that case.

This isn't at all transparent to read:

<pre>
class one {
  require("two")
  ...
}
</pre>

I naively expected the syntax to look like:

<pre>
class one {
  require(Class["two"])
  ...
}
</pre>

and to be able to require any kind of object, but given this function can only 
require classes, I suggest this would be a big improvement.

<pre>
class one {
  require_class("two")
  ...
}
</pre>



-- 
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