Why not use `warnonce` (https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/warnings.rb#L10) ?