I don't suppose it would help to set the empty list to "undefined"? And take action accordingly? (i.e. check its value and if it is "undefined", then do nothing?)
I understand it'd be a messy workaround and that you really do want an empty slist... Aleksey 2011/7/5 Ted Zlatanov <[email protected]>: > This is similar to > https://cfengine.org/pipermail/help-cfengine/2010-August/009339.html but > I really need an empty slist, I think. > > My syntax is: > > bundle agent x > { > vars: > ... > case1:: > "slistA" slist => { }; > "slistB" slits => { "case1 data" }; > > case2:: > "slistA" slist => { "case2 data" }; > "slistB" slist => { }; > > ... > files: > "myfile" edit_line => my_edit_bundle(@(x.slistA), @(x.slistB)); > } > > In other words, I need to pass two slists to my editing bundle, one of > which may be empty (in some cases they both have data). > > CFEngine really doesn't like empty slists, but I don't want to have 3 > cases: where the first parameter is defined, where the second is > defined, and where both are defined. I also don't want to do two edits, > one editing bundle must be sufficient. > > Any ideas? Am I stuck listing all the possible parameter combinations? > > Thanks > Ted > _______________________________________________ > Help-cfengine mailing list > [email protected] > https://cfengine.org/mailman/listinfo/help-cfengine > _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
