Evan Hisey wrote:

>>> I think you should have
>>>
>>> class myclass ($passwd = "111") {
>>>     file {"....
>> this syntax is completely new to me, where is it documented?
>>
>> thanks and cheers pete
>>
> It is document under variable scope in the puppet language guide. The
> short version or rule of thumb I use is "closet scope gets used". Not
> sure if that is the best way, but it seems to work.

http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#variable-scope
does not mention that syntax as far as I can see.  It tells us how
scoping works, but no mention about putting variable assignments
inside parenthesis between the class name and the opening brace of
the class body.  And more tellingly, actually trying it with Puppet
errors out with the message "Syntax error at '('; expected ')'".

That section of the language tutorial *does* show how the original
poster should solve his problem.  But it is not with the syntax that
Trevor suggested.


        /Bellman

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