diff options
Diffstat (limited to 'lib/puppet/parser/scope.rb')
-rw-r--r-- | lib/puppet/parser/scope.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index a61a8578f..dba94407e 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -236,9 +236,13 @@ class Puppet::Parser::Scope end elsif ephemeral_include?(name) or table.include?(name) # We can't use "if table[name]" here because the value might be false + if options[:dynamic] and self != compiler.topscope + location = (options[:file] && options[:line]) ? " at #{options[:file]}:#{options[:line]}" : '' + Puppet.deprication_warning "Dynamic lookup of $#{name}#{location} will not be supported in future versions. Use a fully-qualified variable name or parameterized classes." + end table[name] elsif parent - parent.lookupvar(name,options) + parent.lookupvar(name,options.merge(:dynamic => (dynamic || options[:dynamic]))) else :undefined end |