105: def change_to_s(currentvalue, newvalue)
106: begin
107: if currentvalue == :absent
108: return "defined '%s' as '%s'" %
109: [self.name, self.currentsum]
110: elsif newvalue == :absent
111: return "undefined %s from '%s'" %
112: [self.name, self.is_to_s(currentvalue)]
113: else
114: if defined? @cached and @cached
115: return "%s changed '%s' to '%s'" %
116: [self.name, @cached, self.is_to_s(currentvalue)]
117: else
118: return "%s changed '%s' to '%s'" %
119: [self.name, self.currentsum, self.is_to_s(currentvalue)]
120: end
121: end
122: rescue Puppet::Error, Puppet::DevError
123: raise
124: rescue => detail
125: raise Puppet::DevError, "Could not convert change %s to string: %s" %
126: [self.name, detail]
127: end
128: end