Hi,

I only have defined a simple class based on a built-in function, not a
variable, not much different  from the example given here:

http://www.cfengine.org/manuals/cf3-reference.html#Function-fileexists

Looks like the function is called somewhere between vars and reports, so
that test_class is not defined when  vars is evaluated  but gets defined in
reports :(. However , when test_class is defined based on simple built-in
classes, things work ok. If it were a simple processing order ( vars,
classes, other .. )  it shouldn't  have worked in the second scenario I
guess.



Thanks,
mlz.



On Tue, Mar 29, 2011 at 4:52 PM, <[email protected]> wrote:

> Forum: Cfengine Help
> Subject: Re: errors when defining classes based on built-in functions
> Author: bbomgardner
> Link to topic: https://cfengine.com/forum/read.php?3,21286,21287#msg-21287
>
> This has to do with the static order of agent operations.
> http://www.cfengine.org/manuals/cf3-reference.html#Normal-ordering
>
> Vars are defined before classes, so your test_var is not being defined
> because the class was not defined yet.  Its a little confusing because you
> can list promise types however you want in the bundle, but that doesn't mean
> they get executed in that order.
>
> _______________________________________________
> 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

Reply via email to