summaryrefslogtreecommitdiff
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorDavid Schmitt <david@black.co.at>2016-11-27 17:39:07 +0000
committerDavid Schmitt <david@black.co.at>2016-11-27 17:39:07 +0000
commitc5fbd82204e9832b0d398e894003e9898adb71fc (patch)
tree2d3a079f05f97874d0d317f83d1c0a8c7ffc214d /lib/puppet/parser
parent419f7d63ecf4a98ae55d614bc692544a639820ab (diff)
Remove rvalue declaration from v3 deprecation() function
Without this, some uses of this function do not work in puppet3. e.g. if $include_src != undef { deprecation('apt $include_src', "please use \$include => { 'src' => ${include_src} } instead") } causes Function 'deprecation' must be the value of a statement on puppet 3.8.7.
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/functions/deprecation.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/deprecation.rb b/lib/puppet/parser/functions/deprecation.rb
index e30f3a0..cd64fe2 100644
--- a/lib/puppet/parser/functions/deprecation.rb
+++ b/lib/puppet/parser/functions/deprecation.rb
@@ -1,5 +1,5 @@
module Puppet::Parser::Functions
- newfunction(:deprecation, :type => :rvalue, :doc => <<-EOS
+ newfunction(:deprecation, :doc => <<-EOS
Function to print deprecation warnings (this is the 3.X version of it), The uniqueness key - can appear once. The msg is the message text including any positional information that is formatted by the user/caller of the method.).
EOS
) do |arguments|
@@ -9,7 +9,7 @@ EOS
key = arguments[0]
message = arguments[1]
-
+
if ENV['STDLIB_LOG_DEPRECATIONS'] == "true"
warning("deprecation. #{key}. #{message}")
end