Hi,

On 04/01/2016 17:01, jcbollinger wrote:

> Your revised idea appears workable.

Ah... cool. ;)

> It establishes class moda::params as a shared data source, along the lines I 
> suggested.

Yes indeed, it's close to what you have proposed.

> It allows module moda to 
> be customized, via class moda::params, and if parameters for modb are not 
> otherwise specified then modb will draw parameter values from those that 
> would be used by moda if it were declared, whether moda actually is 
> declared or not.
> 
> I do have a couple of observations for you to consider, however:
> 
> 
>    1. Your use of the 'require' function suggests that you may not 
>    understand its distinction from 'include', as that distinction has no 
>    significance whatever in this particular case.  'require' differs only 
>    in placing *order-of-application* constraints, but the params class 
>    contains nothing to apply.

Yes, yes, you are absolutely right indeed. "require" is not necessary at all,
a simple "include" is enough and avoid to create useless (and maybe problematic)
"order-of-application" relations. Yes, "include" is enough and perfect. Thanks.

>    2. It is unclear why you want to use a data function instead of class 
>    parameter defaults in module modb.  The result is not, technically, a 
>    default value, though it is a reasonable facsimile.  Nevertheless, the 
>    nature of the relationship between the two modules would be clearer if you 
>    used straight-up resource defaults and the standard params class pattern.  
>    That that would involve cross-module class inheritance, is moot -- hiding 
>    the close inter-module coupling inside a data function is not inherently 
>    better than having it obvious in class declarations.

Yes... after thinking, the only reason I see to use the data function in the
module modb is to have exactly the same design in all modules. But indeed it's
moot.

Many thanks for your help and your remarks John.
Regard.

François Lafont

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/568DB3A0.7010109%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to