I was looking through the Puppet style guide for something unrelated,
and noticed that it explicitly discourages doing things in this exact
manner:
http://docs.puppetlabs.com/guides/style_guide.html -> Section 11.9.

Does the style guide need updated then?

Justin

On Jan 13, 4:17 pm, Gary Larizza <g...@puppetlabs.com> wrote:
> On Fri, Jan 13, 2012 at 2:02 PM, Justin Ellison <jus...@techadvise.com>wrote:
>
> > I asked in IRC today, and no one could tell me the benefit -- maybe
> > puppetlabs or example42 can answer my question.
>
> > I've seen a handful of pretty bleeding-edge modules combining the use
> > of foo::parms, inheritance, and parameterized classes.  Here's two
> > examples:
>
> >https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/...
> >https://github.com/example42/puppet-openssh/blob/master/manifests/ini...
>
> > Why use inheritance instead of an 'include foo::params'?  Why use
> > params at all if the class is parameterized?
>
> The inheritance allows you to reference the foo::params::bar variable
> inside the parameter section of the class definition (the part at the top
> where there is '$my_class = $openssh::params::my_class,'.
>
> Why use parameters?  It's a way to set a 'sane default' to the parameters
> in the class back to the value that's in the foo::params class.  If you
> want to override what's set in foo::params, just pass it in the class
> declaration.  If you want to use the default value in foo::params, just
> declare the class by doing 'include <class>' and NOT pass any parameters.
>
> Does this help?
>
> > Thanks,
>
> > Justin
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Puppet Users" group.
> > To post to this group, send email to puppet-users@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.
>
> --
>
> Gary Larizza
> Professional Services Engineer
> Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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