On Tue, Oct 12, 2010 at 12:27 PM, R.I.Pienaar <[email protected]> wrote:
> How does all this stuff relate to parametrized classes? What is the
> behavior of class A (with parameters) being inherited by B? Does B get the
> exact same list of parameters, how does B add to this list? Does it restate
> the whole list of parameters?
>
> Testing suggests that:
>
> class foo($bar) {
> notice($bar)
> }
>
> class foo::bar inherits foo {
> notice($bar)
> }
>
> class{"foo::bar": bar => "baz"}
>
> doesnt work: Invalid parameter bar at /home/rip/test.pp:9 on node ..
>
>
> I think it should, I also think foo::bar should be able to just append to
> the parameter list the stuff it is interested in.
>
> I know I am kind of hijacking the thread but seems related
>
>
Well, inheriting doesn't work with parameterized classes at all right now,
because of bug 4534 :)
But I think you have a good point, R.I. The "fix" for 4534 that I put in on
Friday really doesn't address how parameters are related between the base
class and the derived class. This subject probably deserves more
discussion, either on this thread or another one.
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.