On 3 September 2013 15:00, Eric Sorenson <[email protected]>wrote:

> Replies inline; I've butchered the quoting but will try to keep the
> attribution correct.
>
>
>> [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.
>
>
>
I would prefer option 2, so you can replace include() with contain() when
you need containment. But I wouldn't have it pass parameters to the class,
just make it exactly like include in that sense.

If you want to pass parameters it should still be possible to use a
resource style class declaration and then call contain() on it as include
will first check if it is already in the catalog.

-- 
Erik Dalén

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