# Methods to help with handling warnings.
module Puppet::Util::Warnings
    module_function

    def warnonce(msg)
        $stampwarnings ||= {}
        $stampwarnings[self.class] ||= []
        unless $stampwarnings[self.class].include? msg
            Puppet.warning msg
            $stampwarnings[self.class] << msg
        end
    end
end

# $Id: warnings.rb 1580 2006-09-13 16:48:56Z lutter $


syntax highlighted by Code2HTML, v. 0.9.1