diff options
Diffstat (limited to 'lib/puppet/parser/scope.rb')
-rw-r--r-- | lib/puppet/parser/scope.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index b607bb081..9165cdb7e 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -12,7 +12,11 @@ module Puppet::Parser # This doesn't actually work right now. Puppet.config.setdefaults(:puppet, - :lexical => [false, "Whether to use lexical scoping (vs. dynamic)."]) + :lexical => [false, "Whether to use lexical scoping (vs. dynamic)."], + :templatedir => ["$vardir/templates", + "Where Puppet looks for template files." + ] + ) Puppet::Util.logmethods(self) @@ -39,6 +43,14 @@ module Puppet::Parser @@declarative = val end + def method_missing(name, *args) + if value = lookupvar(name.to_s) and value != :undefined and value != "" + return value + else + super + end + end + # Add all of the defaults for a given object to that object. def adddefaults(obj) defaults = lookupdefaults(obj.type) |