In the normal override method, you can change the value of a parameter, but can you unset a parameter? file { "/etc/somefile": mode => 644, owner => "dude" } File ["/etc/somefile"] { mode => unset } ??
On May 7, 2007, at 8:07 PM, Digant C Kasundra wrote:> In the normal override method, you can change the value of a > parameter, but > can you unset a parameter? > > file { "/etc/somefile": > mode => 644, > owner => "dude" > } > > File ["/etc/somefile"] { mode => unset } ??Nope. If you can recommend a syntax, I can probably implement it pretty quickly. -- The point of living and of being an optimist, is to be foolish enough to believe the best is yet to come. -- Peter Ustinov --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
--On Monday, May 07, 2007 10:31 PM -0500 Luke Kanies <luke@madstop.com> wrote:> Nope. If you can recommend a syntax, I can probably implement it > pretty quickly.How about "whatever => undefined" ? Someone might have a better suggestion.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 08 May 2007, Digant C Kasundra wrote:> --On Monday, May 07, 2007 10:31 PM -0500 Luke Kanies <luke@madstop.com> > > wrote: > > Nope. If you can recommend a syntax, I can probably implement it > > pretty quickly. > > How about "whatever => undefined" ? > > Someone might have a better suggestion.Sounds good to me. Regards, David - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGQELO/Pp1N6Uzh0URAuPBAKCdbHc4xCOC8GkBkiE8d2Ol0uckEACfdwAn 88eYb7wl+3EmJMS2FaFNpck=TA+O -----END PGP SIGNATURE-----
On May 7, 2007, at 11:19 PM, Digant C Kasundra wrote:> --On Monday, May 07, 2007 10:31 PM -0500 Luke Kanies > <luke@madstop.com> > wrote: > >> Nope. If you can recommend a syntax, I can probably implement it >> pretty quickly. > > How about "whatever => undefined" ? > > Someone might have a better suggestion.How about we just use ''nil'' instead, like Ruby uses? Then I''ll modify resources so that they don''t translate any parameters that have ''nil'' as a value. -- Don''t throw away the old bucket until you know whether the new one holds water. -- Swedish Proverb --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
--On May 8, 2007 9:51:03 AM -0500 Luke Kanies <luke@madstop.com> wrote:> On May 7, 2007, at 11:19 PM, Digant C Kasundra wrote: > >> --On Monday, May 07, 2007 10:31 PM -0500 Luke Kanies >> <luke@madstop.com> >> wrote: >> >>> Nope. If you can recommend a syntax, I can probably implement it >>> pretty quickly. >> >> How about "whatever => undefined" ? >> >> Someone might have a better suggestion. > > How about we just use ''nil'' instead, like Ruby uses? Then I''ll > modify resources so that they don''t translate any parameters that > have ''nil'' as a value.I thought about suggesting nil but then thought against it for the exact same reason. I''m an advocate of Puppet staying Puppet and not looking too much like Ruby. :)
On May 8, 2007, at 12:00 PM, Digant C Kasundra wrote:> > I thought about suggesting nil but then thought against it for the > exact > same reason. I''m an advocate of Puppet staying Puppet and not > looking too > much like Ruby. :)How about ''undef'', then? Fewer characters. -- Zeilinger''s Fundamental Law: There is no Fundamental Law. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Luke Kanies wrote:> How about ''undef'', then? Fewer characters. > >Or perhaps ''default'', which would also be useful in function parameters as discussed before (so that parameters can be used within the function for resource attributes, but they indicate default settings). Not sure if default and undef in this case are distinct -- perhaps they could be in certain cases... Mark -- Mark D. Nagel, CCIE #3177 <mnagel@willingminds.com> Principal Consultant, Willing Minds LLC (http://www.willingminds.com) cell: 949-279-5817, desk: 714-630-4772, fax: 949-623-9854
Hi, Luke Kanies wrote:> On May 8, 2007, at 12:00 PM, Digant C Kasundra wrote: >> I thought about suggesting nil but then thought against it for the >> exact >> same reason. I''m an advocate of Puppet staying Puppet and not >> looking too >> much like Ruby. :) > > How about ''undef'', then? Fewer characters.I like ''undef'' but I think that''s because it reminds me of perl (this worries me :)) -- Bob
On May 8, 2007, at 12:24 PM, Mark D. Nagel wrote:> Luke Kanies wrote: >> How about ''undef'', then? Fewer characters. >> >> > Or perhaps ''default'', which would also be useful in function > parameters > as discussed before (so that parameters can be used within the > function > for resource attributes, but they indicate default settings). Not > sure > if default and undef in this case are distinct -- perhaps they > could be > in certain cases...That''s a good point -- I''d have to make sure to interpret the ''undef'' before defaults were handled. -- Westheimer''s Discovery: A couple of months in the laboratory can frequently save a couple of hours in the library. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
> On May 8, 2007, at 12:00 PM, Digant C Kasundra wrote: >> >> I thought about suggesting nil but then thought against it for the >> exact >> same reason. I''m an advocate of Puppet staying Puppet and not >> looking too >> much like Ruby. :) > > How about ''undef'', then? Fewer characters.Perhaps it''s insane. Since namespace conflict seems like it could be a perpetual issue, what about having a parameter that unsets other parameters? unset => variable1, variable2, variable3
--On May 8, 2007 12:11:14 PM -0500 Luke Kanies <luke@madstop.com> wrote:> How about ''undef'', then? Fewer characters. >Undef sounds great.
On May 8, 2007, at 12:45 PM, Benjamin C. Kite wrote:> > > Perhaps it''s insane. > > Since namespace conflict seems like it could be a perpetual issue, > what about having a parameter that unsets other parameters? > > unset => variable1, variable2, variable3Naming conflicts always show up, but we''d just make it a keyword and be done, I think. If you want it to interpreted literally, just quote it. If we did what you''re suggesting, it would require a significant rearchitecting of how the parser works, in ways that make my head hurt. On the other hand, having a special ''undef'' keyword would be very easy -- a new keyword in the lexer and parser, and an extra step when translating the resource for sending to the client. Probably less than an hour''s work. -- It''s not to control, but to protect the citizens of Singapore. In our society, you can state your views, but they have to be correct. -- Ernie Hai, co-ordinator of the Singapore Government Internet Project --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On 8 May , 2007, at 13:53, Luke Kanies wrote:> If we did what you''re suggesting, it would require a significant > rearchitecting of how the parser works, in ways that make my head > hurt. > > On the other hand, having a special ''undef'' keyword would be very > easy -- a new keyword in the lexer and parser, and an extra step when > translating the resource for sending to the client. Probably less > than an hour''s work.That''s what I call an "easy decision". (hopefully quickly enough to foil anyone planning to call it a "no- brainer")