On Mon, Oct 21, 2013 at 12:11 PM, Rainer Gerhards
<[email protected]>wrote:

>
> On Mon, Oct 21, 2013 at 12:09 PM, David Lang <[email protected]> wrote:
>
>> On Mon, 21 Oct 2013, Rainer Gerhards wrote:
>>
>>  On Mon, Oct 21, 2013 at 8:52 AM, Rainer Gerhards
>>> <[email protected]>**wrote:
>>>
>>>  On Sun, Oct 20, 2013 at 6:03 PM, Pavel Levshin <[email protected]
>>>> >wrote:
>>>>
>>>>
>>>>> I am unable to reproduce this behaviour with global variables. This is
>>>>> what I've tried among others:
>>>>>
>>>>>     if $/zz % 3 == 0 or $/zz % 3 == 1 then {
>>>>>         set $/zz = $/zz + 1;
>>>>>         action(...)
>>>>>     } else {
>>>>>         set $/zz = 0;
>>>>>         action(...)
>>>>>     }
>>>>>
>>>>> Could you please explain how is it supposed to work?
>>>>>
>>>>>
>>>> It's supposed to work just as you describe it. But indeed, it doesn't do
>>>> so, I can reproduce the problem. Looks like a regression. Thanks for
>>>> reporting, will now look into it.
>>>>
>>>>
>>> OK, looks like I stumbled into my own trap. In script, you access
>>> properties via $<propname>. Global variables have the name $/zz (with zz
>>> being the real name). So to access them, you need to access $$/zz.
>>>
>>> I think I got confused about this some time ago, and the doc is also not
>>> correct or at least inconsistent. I now need to work my way through that
>>> mess. Just thought I give you some explanation.
>>>
>>
>> Ouch, this is going to get ugly since $$var actually ends up giving you a
>> reference to $var not it's value, I believe from prior discussions that the
>> normal variables are $property of $!var!var,
>
>
> That previous discussion was wrong, it is $$!var!var - and it does not
> give the ref to $var, but it's value.
>
>
well, let me re-phrase it a little bit: I am quite confused right now, but
I think this is how it is. I guess I need a break looking at that var code,
and the code may want to have a big refactoring -- so much history.

But that doesn't mean I Was wrong with what I said about global vars and
the SIMD engine!

Rainer

> Rainer
>
>> so to have these be $$/var is inconsistant. Since this is a new feature
>> can they be changed to just be $/var?
>>
>> also, check local variables, are they $.var or $$.var?
>>
>> David Lang
>>
>> ______________________________**_________________
>> rsyslog mailing list
>> http://lists.adiscon.net/**mailman/listinfo/rsyslog<http://lists.adiscon.net/mailman/listinfo/rsyslog>
>> http://www.rsyslog.com/**professional-services/<http://www.rsyslog.com/professional-services/>
>> What's up with rsyslog? Follow https://twitter.com/rgerhards
>> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
>> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
>> DON'T LIKE THAT.
>>
>
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to