----- Original Message ----- > From: "Felix Frank" <felix.fr...@alumni.tu-berlin.de> > To: puppet-users@googlegroups.com > Sent: Thursday, June 21, 2012 10:18:50 AM > Subject: Re: [Puppet Users] Custom facts and hyphens > > On 06/21/2012 12:30 AM, Jo Rhett wrote: > > I'm not saying that you're wrong, but I'm still struggling to see > > this. > > Every place that class names are used should be single quoted, > > according > > to your style guide. And it's very easy in a syntax to tell the > > different between 'test-jo + 2' and 'test - jo + 2'. Those are not > > ambiguous. > > I beg to differ: > > $value = 1 > $value-2 = 2 > $sum = $value-2 +2 > > As for class names - I don't really care one way or the other. It's > been deprecated for so long that we rid our manifests of dashes in class > names very early.
You probably should as class names are variable names $foo::bar vs $foo-foo::bar > The limitation seems consistent with the PHP-like syntax, though (is > it heresy to say this?;) Also ruby, and this is significant, allowing people to make variable names that they cannot use in a template is not doing them any favours as it force them to do scope.lookupvar("foo-foo"). In the 0.24 days -'s were documented as not supported but they worked in a few scenarios and others they didn't. I requested then that the parser fail on -'s but instead the docs were updated and a cycle of bug fixes around "-" in varnames started. This went on for countless releases and while trying to get this to work everywhere there was this multi year flip flop between sets of bugs with ever changing behaviour making even small dot release upgrades a nightmare where old templates and code suddenly produce different results. To the point where I ended up writing a widely used tool to diff 2 catalogs to highlight any differences in content of files etc. I do not think this has done anyone any favours so I very much welcome the change if it means more certainty and stability. I only wish the change didnt get introduced in a release this late in 2.7.x -- 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.