Hi everyone,
I try to import a class in a definition, named by a variable.
The import works but how do I access the class-variables?
Here is a sample definition:
define test-def ($testvar1){
notify { "Name -> $name .. testvar1 -> $testvar1": }
include "$name"
notify { "Class Variable: $test4include::one":}
notify { "Class Variable2: $test4include::$testvar1":}
# notify { "Class Variable3: $name::one":}
# notify { "Class Variable4: $name::$testvar1":}
}
The sample class:
class test4include {
$one = "1st Variable"
}
The call of the definition:
test-def { test4include:
testvar1 => "one",
}
And here the result:
[...]
notice: Starting configuration run
notice: Name -> test4include .. testvar1 -> one
notice: Class Variable2: ::one
notice: Class Variable: 1st Variable
[...]
Thank you for help,
Matthias Bender.