On 11/09/12 13:59, Seva Gluschenko wrote:
> Gregory,
>
> Pay your attention to common bundles which are the only way to define
> global variables, i.e.:

eh? I thought all variables had global scope but they just needed to be 
qualified with the bundle name in which they are defined?

G

>
> bundle common g
> {
>   vars:
>   ...
> }
>
> Meanwhile, there's no need to include common bundles into the bundlesequence.
>
> --
> Best,
> Seva
>
> 2012/9/11 Gregory Matthews<greg.matth...@diamond.ac.uk>:
>> what is wrong here?
>>
>> body common control
>> {
>>     bundlesequence =>  { "g", "test" };
>>     inputs =>  { "cfengine_stdlib.cf" };
>> }
>>
>> bundle agent g
>> {
>> vars:
>>     "list" slist =>  { "1", "2", "3" };
>> }
>> bundle agent test
>> {
>> reports:
>>     "debug: $(g.list)";
>> }
>>
>> results in:
>> R: debug list: $(g.list)
>>
>> defining the list locally to the "test" bundle results in iteration as
>> expected.
>>
>> CFEngine Core 3.2.1
>>
>> any help appreciated.
>>
>> GREG
>


-- 
Greg Matthews        01235 778658
Scientific Computing Group Leader
Diamond Light Source Ltd. OXON UK

-- 
This e-mail and any attachments may contain confidential, copyright and or 
privileged material, and are for the use of the intended addressee only. If you 
are not the intended addressee or an authorised recipient of the addressee 
please notify us of receipt by returning the e-mail and do not use, copy, 
retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not 
necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments 
are free from viruses and we cannot accept liability for any damage which you 
may sustain as a result of software viruses which may be transmitted in or with 
the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and 
Wales with its registered office at Diamond House, Harwell Science and 
Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 



_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to