4 module Puppet::Parser::Functions
5 newfunction(:deprecation, :doc => <<-DOC
7 Function to print deprecation warnings (this is the 3.X version of it).
9 The uniqueness key - can appear once. The msg is the message text including any positional
10 information that is formatted by the user/caller of the method.).
13 return deprecation warnings
17 raise(Puppet::ParseError, "deprecation: Wrong number of arguments given (#{arguments.size} for 2)") unless arguments.size == 2
20 message = arguments[1]
22 if ENV['STDLIB_LOG_DEPRECATIONS'] == 'true'
23 warning("deprecation. #{key}. #{message}")