On Tue, Feb 1, 2011 at 2:30 PM, Ian Ward Comfort <[email protected]>wrote:
> On 1 Feb 2011, at 2:02 PM, Dan Bode wrote: > > I wanted to open the feature request > http://projects.puppetlabs.com/issues/5824 for discussion. > > > > I like to specify all dependencies not defined within the enclosed scope > using the new relationship syntax. > > > > This leads to nice clean error messages if the required resources have > not been declared. > > > > class foo ( > > $bar => 'baz' > > ) { > > Class['foo']->Class['super-ninja-app'] > > .. resources and what-not > > } > > > > I often use this syntax to specify external dependencies of the class > itself. I am starting to use this pattern *a lot* > > > > Having to specify > > > > Class['foo']-> within class foo { } > > > > in less than optimal for two reasons: > > 1. more characters > > 2. if the name of the class changes, then the reference to the class > also needs to change > > > > I would like to introduce the 'self' keyword to be used in this > situation. > > I like this idea in theory. (I limit my statement only because we're still > in the process of migrating to 2.6.x here, and my ideas about parameterized > classes and how I'd like to use them are still purely theoretical.) Since > the longhand syntax is already permitted, providing "Self" as shorthand > doesn't seem too dangerous -- modulo keyword namespace concerns, I guess. > > I'm curious to hear Nigel's misgivings, though, in case I'm missing > something. > My misgivings are blurry, but center around complexifying what was meant to be a "simple DSL". -- 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.
