EXCELLENT GUIDE !!!
I which that had been available when I started on Geppetto :)

Here are some things that I would like the documentation to clarify:

- How do I create strings that span multiple lines? (Since there is no
string concatenation operator 'x' + 'y' does not work). Can I write a string that continues on the next line? If so, is the newline included or not? Can I tell it to not include the newline? How is the line-break encoded - if it is CR-LF in the pp-file, does the string contain that at runtime?

- Can I write more complex expressions in an interpolation? Can I do something like "The sum is ${$a + $b}", and if that is the case, is it possible to have any expression interpolated (including nested strings with interpolation)?

- The compiler allows ${a} without double quotes - which is a string interpolation of $a. Which IIRC is slightly different than using $a directly (getting an empty string if $a is undefined). I don't recall seeing that in the documentation on the first read through.

- IIRC, Use of numerical variables $0 - $9 as a result of regular expression matching was not mentioned. When talking about variables I think it is worth noting that you should not use $0 - $9 for anything else (or you may be surprised as the regexp match creates an inner scope where these variables refer to match results). (IMO use of $0-$9 should be reserved for that purpose and they should not be assignable).

- Arrays and Hashes are mutable; which is either an bug or a language feature. While it is not allowed to directly change a variable, it can be indirectly modified if it refers to an array or hash. Great if the documentation can clarify if this is a supported feature or should be avoided. i.e. $a = [1,2,3] $a[0] = 10. (IMO, this is problematic as any logic can refer to the variable and assign to an entry - at least last I tried).


Again, an excellent language reference!
Regards
- henrik


On 2012-21-08 22:40, Nick Fagerlund wrote:
Hi all,

I've finished the all new Puppet 2.7 language reference. EXCITING! Well,
exciting to me, at least. Table of contents:

http://docs.puppetlabs.com/puppet/2.7/reference/

Visual index (for when you know what you're looking for but you don't
know what it's called):

http://docs.puppetlabs.com/puppet/2.7/reference/lang_visual_index.html

And of course, use the navigation in the left sidebar to jump between
pages.

Our goal here is to nail down every detail of how the Puppet language
works, then cut new versions along with major Puppet releases. We'll
eventually be expanding this versioned document with non-language
details -- we've been referring to this plan as the "Puppet reference
manual." Its purpose isn't to replace any of the guides or how-tos, but
to lay down a "just the facts" baseline that lets you get in and out fast.

Anyway, we hope you find it useful. Thanks for using Puppet.

--
You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/bDBvT082CjQJ.
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.


--
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.

Reply via email to