On Sep 3, 2013, at 12:30 PM, Jeff McCune <[email protected]> wrote:

> On Tue, Sep 3, 2013 at 12:00 PM, Eric Sorenson <[email protected]> 
> wrote:
> [Andy] Here are the possibilities:
>   * resource like syntax for classes expresses containment:
>       class container { class { contained: parameter => value } }
>   * a function declares the class *and* expresses containment
>       class container { contain(contained, { parameter => value }) }
>   * a function expresses containment, but does not declare the class
>       class container { class { contained: parameter => value } 
> contain(contained) }
>   * a new "resource type" expresses containment
>      class container { contain { contained: parameter => value } }
> 
> I'm most in favour of number 3 here, a function to express the containment as 
> a separate thing to declaring the class.
> 
> +1 to a function expressing containment but not declaring the class (#3).  
> It's the only option of the 4 provided that doesn't have the side-effect of 
> adding the class to the catalog.  I've run across situations where a module 
> may want to contain a third party class and relies on some other module to 
> declare the class.  "site" modules are a common example.

Sorry, why?  What's the benefit of requiring a second call?  Or, what's the 
downside of defaulting to 'include' for classes that have not yet been 
evaluated?

> A separate, focused, function also keeps our support matrix small and more 
> maintainable.  We'll want to implement the behavior consistently across all 
> the ways of adding classes to catalogs if we implement the behavior for one 
> of them.  These behaviors are burdensome to maintain over time.  A contains() 
> function allows the behavior to work with all the ways of adding classes to 
> the catalog while allowing us to maintain the code in one supported manner.

Can you elaborate?  I don't know what you mean.  What's burdensome about having 
'contain' call 'include'?

Do you think it's a mistake for 'require' to call 'include'?

-- 
Luke Kanies | http://about.me/lak | http://puppetlabs.com/ | +1-615-594-8199

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to