body file control
{
  namespace => "b";
}

bundle agent test_in_namespace(passed_list)
{
  vars:
      "mylist" slist => { @(passed_list) };
      "joined" string => join(",", "mylist");

  classes:
      "mylist_$(mylist)" expression => "any";

  reports:
    default:DEBUG::
      "BUG: mylist___mylist_ was defined!" ifvarclass => "mylist___mylist_";
      "BUG: mylist_1 not defined" ifvarclass => "!mylist_1";
      "GOOD: mylist_1 was defined" ifvarclass => "mylist_1";
      "mylist = $(b:test_in_namespace.mylist)";
      "mylist without namespace = $(test_in_namespace.mylist)";
      "mylist without qualifiers = $(mylist)";
      "Set joined to $(joined)";
}

bundle agent check_in_namespace(target,test)
{
  methods:
      "any" usebundle => default:dcs_check_strcmp("$(b:test_in_namespace.joined)", "$(target)", "$(test)", "no");
  reports:
    default:DEBUG::
      "comparing '$(b:test_in_namespace.joined)' and '$(target)'";
}
