Hi,
Sorry Risto i think i explained wrongly. Sorry for my english again.
How can i access and retrieve the values declares in "Rule 1" (assign
sentences)(ex. assign %priority (medium);) in the lcall block of code in
"Rule 3"?
One case:
I want to print the value of %priority variable declared in "Rule 1" in
"Rule 3"? The variable is created in "Rule 1" with assign sec sentence. How
can i access?
In "Rule 3":
For example, in lcall block:
print "%priority";\-->Output: prints nothing or %priority. It doesn´t
print the value assigned in "Rule 1".
Also thank you for the explanation of lcall and eval.
Regards. Thank for your help again.
2016-12-19 12:44 GMT+01:00 Risto Vaarandi <risto.vaara...@gmail.com>:
> > Which is the difference between eval and lcall?
>
> 'eval' will compile the code before *each* execution. This has the
> advantage of using match variables and action list variables directly
> in the code:
>
> action=assign %test mystring; eval %o ( print "%test", "\n" )
>
> For example, the above action list does the following:
> 1) action list variable %test is set to mystring;
> 2) the action list variable %test is substituted in the Perl code of
> 'eval' action, yielding:
> print "mystring", "\n"
> 3) the code print "mystring", "\n" is compiled
> 4) the compiled code is executed
>
> However, because of step 3 the 'eval' action is *very* expensive when
> compared to 'lcall'. With 'lcall', the perl code is just compiled once
> when SEC reads in rules from its configuration files, and all the
> invocations of 'lcall' execute already compiled code. Therefore, I
> would recommend to use 'eval' only when it is going to be executed few
> times (e.g., for loading Perl modules at SEC startup).
>
> hope this helps,
> risto
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users