From 5528911bd6fd784ed9550ed475f240a64c7a56fb Mon Sep 17 00:00:00 2001 From: Jacob Helwig Date: Thu, 14 Apr 2011 15:53:51 -0700 Subject: (#7111) Clarify scoping deprecation warning This modifies the deprecation warning to explicitly point out that the specified behavior is deprecated, when it is slated to be removed, along with what the user can do to prepare for its removal. Paired-with: Randall Hansen --- lib/puppet/parser/scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index 8de9d60b1..99f1c6ee2 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -238,7 +238,7 @@ class Puppet::Parser::Scope # 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.deprecation_warning "Dynamic lookup of $#{name}#{location} will not be supported in future versions. Use a fully-qualified variable name or parameterized classes." + Puppet.deprecation_warning "Dynamic lookup of $#{name}#{location} is deprecated. Support will be removed in Puppet 2.8. Use a fully-qualified variable name (e.g., $classname::variable) or parameterized classes." end table[name] elsif parent -- cgit From a509821f6c2da0a07bc63af433f6e36061d4f241 Mon Sep 17 00:00:00 2001 From: Jacob Helwig Date: Thu, 14 Apr 2011 15:56:49 -0700 Subject: Cleanup trailing whitespace --- lib/puppet/parser/scope.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index 99f1c6ee2..a8bb4418a 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -222,12 +222,12 @@ class Puppet::Parser::Scope private :qualified_scope - # Look up a variable. The simplest value search we do. + # Look up a variable. The simplest value search we do. def lookupvar(name, options = {}) table = ephemeral?(name) ? @ephemeral.last : @symtable # If the variable is qualified, then find the specified scope and look the variable up there instead. if name =~ /^(.*)::(.+)$/ - begin + begin qualified_scope($1).lookupvar($2,options) rescue RuntimeError => e location = (options[:file] && options[:line]) ? " at #{options[:file]}:#{options[:line]}" : '' -- cgit