On Dec 24 2010, 8:41 am, Daniel Piddock <dgp-g...@corefiling.co.uk> wrote: > I've done a bit of poking around the issue tracker. Issue 4473 > http://projects.puppetlabs.com/issues/4473 appears to be the ticket > related to this.
No, I don't think it is. Issue 4473 is about resolving parent class names in a class inheritance scenario. Puppet considers the namespace of the class being defined when it attempts to resolve the parent class name, and I agree with the submitter of that report that doing so is a bit surprising. It can and does work, however. On the other hand, resolving class names appearing within the body of a class, as we're discussing here, is an altogether different question. I don't think there is an open issue requesting the kind of name resolution changes you seem to want. It makes sense to consider namespaces from innermost to outermost, as Puppet does. Even issue 4473 only suggests omitting the current class's namespace from those searched for the parent class, not changing the order of the namespaces that *are* searched. > Unfortunately it looks like puppeteers expect this > unusual name resolution order, if they ever knowingly stumble upon it > (e.g. 4483, 4472). Indeed, and they should. Relative names should be resolved against the closest namespace first, against the most distant (relevant) namespace last. It's more intuitive, more modular, and more consistent with programming languages that support name shadowing. > Either I need to hack around this problem carefully > or wait a long time for the next major release, if puppetlabs decide to > follow the OO programming crowd. I recognize that this caught you by surprise, and that it presents an immediate problem for you. I do not agree that it is a "problem" in the sense that Puppet's behavior in this regard is unreasonable or even unusual, however. Naturally, you do need to pay attention to name resolution as you design and write your manifests, but that would be equally or even moreso the case if Puppet's name resolution order were changed. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.