Issue #2281 has been updated by Luke Kanies.

Status changed from Needs design decision to Accepted
Assigned to deleted (Luke Kanies)

I actually had this ability years ago but removed it since it was claimed that 
it made it more complicated with little benefit.

It should be easy to add back.
----------------------------------------
Refactor #2281: Element wrappers
http://projects.puppetlabs.com/issues/2281

Author: James Turnbull
Status: Accepted
Priority: Normal
Assigned to: 
Category: 
Target version: unplanned
Affected version: 0.24.8
Branch: 



A significant portion of functions look something like this:
<pre>
define remotefile(source, mode, owner) {
   file { $name:
      source => "puppet://puppet/module/$source",
      mode => $mode,
      owner => $owner,
   }
}
</pre>
Notice that it just wraps another type, adding a bit of information. It'd be 
great to have a simple language construct that supported this smoothly, so we 
didn't have to respecify every attribute supported by the object type (notice 
particularly that most attributes are *not* overridden). It seems almost like 
it should be a subclass of an existing type, using something akin to ruby's 
"super" function:
<pre>
define remotefile(source) inherits file {
  super {
     source => "puppet://puppet/module/$source"
  }
}
</pre>
This provides the needed functionality and is relatively straightforward in 
concept.


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