On Tue, Jul 26, 2011 at 5:29 AM, vagn scott <vagnsc...@gmail.com> wrote:

>
> In 2.7.2rc2 the '-' is now
> parsed as part of the variable name.
> Is this a deliberate change?
>

I'm trying to track down the actual bug where this got resolved, but yes, I
believe this was deliberately done, and primarily because we allow hyphens
in class names, and so fully qualified variables like
"$foo::bar-baz::variable" weren't working.

Allowing a trailing hyphen doesn't seem like the most optimal solution
though....


>
> #! /usr/bin/puppet apply
>
> $hello = "hello"
> $world = "world"
> $hello- = "SURPRISE"
>
> notice("$hello-$world")
> notice("${hello}-$world")
>

You really should be using curlies with any interpolated string like above.


>
>
> # result:
> #       # ./surprise1.pp
> #       notice: Scope(Class[main]): SURPRISEworld
> #       notice: Scope(Class[main]): hello-world
> #       notice: Finished catalog run in 0.18 seconds
>
> --
> 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+unsubscribe@**
> googlegroups.com <puppet-users%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/**
> group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en>
> .
>
>


-- 
Nigel Kersten
Product Manager, Puppet Labs

*Join us for **PuppetConf *
<http://www.bit.ly/puppetconfsig>
Sept 22/23 Portland, Oregon, USA.
*
*

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