Re: [Puppet Users] Custom facts and hyphens

2012-06-22 Thread Felix Frank
On 06/21/2012 08:55 PM, Jo Rhett wrote: >> $value = 1 >> $value-2 = 2 >> $sum = $value-2 +2 > > I don't see the problem. Those aren't ambiguous for a parser properly > configured. $sum = 4. ...if the parser distinguishes "$value-2" from "$value - 2". Semantic whitespaces? Really? As so often, th

Re: [Puppet Users] Custom facts and hyphens

2012-06-21 Thread Jo Rhett
On Jun 21, 2012, at 2:30 AM, R.I.Pienaar wrote: > 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"). Ruby allows capitalization. Puppet does not. There a

Re: [Puppet Users] Custom facts and hyphens

2012-06-21 Thread Jo Rhett
On Jun 21, 2012, at 2:18 AM, Felix Frank wrote: > 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

Re: [Puppet Users] Custom facts and hyphens

2012-06-21 Thread R.I.Pienaar
- Original Message - > From: "Felix Frank" > 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

Re: [Puppet Users] Custom facts and hyphens

2012-06-21 Thread Felix Frank
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

Re: [Puppet Users] Custom facts and hyphens

2012-06-20 Thread Jo Rhett
On Jun 20, 2012, at 3:02 PM, Nick Fagerlund wrote: > What R.I. said. Hyphens in variable names and class names are a no-no, > although they kinda work in some versions of Puppet. Use underscores instead. > > (Why are hyphens a problem? Well, partly because you can subtract variables > in expres

Re: [Puppet Users] Custom facts and hyphens

2012-06-20 Thread Jo Rhett
On Jun 20, 2012, at 5:22 AM, R.I.Pienaar wrote: >> Are hyphens now officially bad practice? I have a nagging half-memory >> that I read that they're not good in facts, indeed all of the normal >> facts are underscore'd but I can't remember where I read it. > > They've always been a bad idea, used

Re: [Puppet Users] Custom facts and hyphens

2012-06-20 Thread R.I.Pienaar
- Original Message - > From: "Steph Gosling" > To: puppet-users@googlegroups.com > Sent: Wednesday, June 20, 2012 1:20:12 PM > Subject: [Puppet Users] Custom facts and hyphens > > Hi all, > > Possibly related to http://projects.puppetlabs.com/issues/10146 but I > wanted to get a second