Hi, is there a good text in the docs somewhere describing how "::" in
class and variable names work?
I tried to find it, but I didn't manage to do so.
Here,s a quick draft of a text on the subject. I tried to use trac wiki
markup to make it possible to cut-n-paste the text if it is ok (which I
do not expect it to be).
=== Class scoping ===
A class may contain variables, definitions or other classes. To reach
these classes use "::" in the names.
Let's say we got a file containing:
{{{
class Foo {
class Bar {}
$var = "test"
}
class Other::mate {}
}}}
And then you may reference the classes in nodes.pp like this:
{{{
node mynode {
include Foo::Bar, Other::mate
}
}}}
Note that :: may be used in a class name. This may create ambiguities.
For example:
{{{
class Foo {
class Bar{}
}
class Foo::Bar {}
}}}
Which class will Foo::Bar refer to here?
kind regards,
Tarjei
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---