As I said before, the script works as intended.
If one would write "$zu" in a Template he would get an empty string as I don't want to expose script internals just by error.
# But if I change these lines in sub getValue from
...
# here starts the nightmare
# so the provide hash had no key with such name
} else {
# I FEAR THIS
no strict "refs";
# uhm, but it exists, in our namespace ? in our scope? besides
+?
if (defined $$var){
# if so, then take the value of the skalar
$result = $$var;
} else {
warn "undefined Variable $var requested!";
}
}
...
#to
} else {
$result = '$'.$var;
$result =~ s/(\$\w+)/$1/eeg;
}
I don't get an error
- BUT a warning in my log stating that $var has not been imported
- BUT one would get the current value of $zu
which is exactly what I try to avoid, besides, then he gets an empty string for the skalars defined in the required script.
I wouldn't ask if I had a clue on this ;-) |