> Author: sauer > Link to topic: https://cfengine.com/forum/read.php?3,24472,24485#msg-24485
> I use that value as a descriptive name, the same way other promises use it; > usually I choose a more descriptive version of the bundle name, but it always > describes the purpose in one or two words. :) > methods: > any:: > "securetty" usebundle => harden_securetty; > use_alpha_config|!cfengine_3_0:: > "vars" usebundle => harden_vars; That definitely seems more useful than "any". > I'm having difficulty envisioning a scenario where using the name of a module > promise provides any added value - either in functionality or just prettier > syntax It would be a prettier and more consistent syntax for bundles that fulfill a promise for the name of something passed. For example, a files promise might look like: files: "/my/file" perms => mog( "644", "root", "root" ); It's fulfilling some desired state for /my/file. Now let's say I want a bundle to fulfill some desired state for /my/file. Today it seems that we have to do this: methods: "not-used" usebundle => my_bundle("/my/file", "some-other-parameter"); But what I'd rather do is: methods: "/my/file" usebundle => my_bundle("some-other-parameter"); I realize this may not be useful for desirable for all kinds of bundle calls. But I can see it being useful in many situations. That way the language could be used consistently for methods: promises and other kinds of promises. > While I can see the theoretical argument of having the name be accesible > somehow, it'd have to be a new variable; the this.promiser variable anywhere > in a called bundle already has a different meaning, and there's no attribute > of the methods promises (other than possibly "comment") where > $(this.promiser) would make any sense. A new variable would be fine. The reason I thought of $(this.promiser) is because it seems like $(this.promiser) references that same left-hand-side value for files: iterations and searches. You're calling that left-hand-side value a comment in methods: calls, but it's definitely not a comment value for other types of promises. So I'm just suggesting that it be made consistent, and it seems like all we need is a way for the called bundle to access that left-hand-side value. > On an unrelated note, Tod, did you ever work in the Champaign, IL office? > Your name looks familiar, but it's been ~6 years. :) I occasionally work with people there, so we definitely may have crossed paths in the past. Nice to hear from you again if so. :) -- Tod Oace, Intel Corporation <t...@intel.com> _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine