Using the example of the file provider that is bundled with puppet here is a sniglet of code that I've zoomed in on:
def mode if stat = resource.stat return (stat.mode & 007777).to_s(8) else return :absent end end def mode=(value) begin File.chmod(value.to_i(8), resource[:path]) rescue => detail error = Puppet::Error.new("failed to set mode #{mode} on #{resource[:path]}: #{detail.message}") error.set_backtrace detail.backtrace raise error end end can I guess that the first def mod is what is referred to as a "getter" and second is a "setter?" Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv1VzxEgTLO8xv44GcPA0FKboQgEhVTLe%3DM2%2BY%2BMTO%2BAqQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.