On Aug 31, 2010, at 11:48 AM, Nigel Kersten wrote:

> On Tue, Aug 31, 2010 at 4:35 AM, Oliver Hookins <ohook...@gmail.com> wrote:
>> On Aug 31, 10:09 am, Kenneth Holter <kenneho....@gmail.com> wrote:
>>> Hello all.
>>> 
>>> Are there any rule of thumb regarding using "inherits" versus "include"? For
>>> example, if I'm creating the class "syslog::base" which should servere as a
>>> building block for syslog clients, should I go for a "class syslog::client
>>> inherits syslog::base { <something> }" or "class syslog::client { include
>>> syslog::base }"?
>> 
>> Directly from the horse's mouth (we have training this week)...
>> Inherits should only be used when you actually intend to use inherits
>> with overrides. If you don't it makes the code less understandable
>> than if you just used includes. It's more a code understandability
>> issue than functionality.
> 
> ++
> 
> You really don't want to bother with inherits unless you're overriding
> resources in the parent.
> 
> I still feel like we don't have a good term for "namespace" children
> classes, as in a succinct and accurate term for the relationship
> between "syslog" and "syslog::foo". They're not child classes, they're
> ... ?
> 


I might call them "nested classes".


----------------------
Charles Yeomans
Senior Software Engineer
Dakim, Inc.
char...@dakim.com




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to