diff options
Diffstat (limited to 'lib/puppet/functions')
-rw-r--r-- | lib/puppet/functions/deprecation.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/functions/deprecation.rb b/lib/puppet/functions/deprecation.rb index a860aa2..39d9bc7 100644 --- a/lib/puppet/functions/deprecation.rb +++ b/lib/puppet/functions/deprecation.rb @@ -8,6 +8,12 @@ Puppet::Functions.create_function(:deprecation) do end def deprecation(key, message) + if defined? Puppet::Pops::PuppetStack.stacktrace() + stacktrace = Puppet::Pops::PuppetStack.stacktrace() + file = stacktrace[0] + line = stacktrace[1] + message = "#{message} at #{file}:#{line}" + end # depending on configuration setting of strict case Puppet.settings[:strict] when :off |