Download BMC Impact Event Adapters User Guide
Transcript
Sections
The most general method of assignment is represented by the following assignment
form: slot_name can be assigned to the return value of built-in Perl functions, or any
user defined Perl function, that is defined in an external file and loaded with the
REQUIRE directive.
slot_name = <perl_func>( <args>, ...)
<perl_func> can be either a built-in Perl function, such as length or time, or a
function defined in files loaded with the REQUIRE directive. The arguments <args> of
<perl_func> can be any of the following:
■
■
■
■
constants such as “a string”, 1234
input variables such as $avariable, $anothervar[1]
variables known in the global context such as @INC, $ENV{’PATH’}
simple expressions involving function calls such as length($avariable)
Constants and input variables are used as in other assignments. In addition,
<perl_func> can accept other arguments that are valid Perl expressions in the global
context. Local variables of the MAP module MA::Map and other modules are not
known, except for variables with a global scope not declared with a “my’ statement,
when their name is preceded by the module name and ::). These expressions cannot
contain comma characters (,), except in strings that have single or double quotes. For
example, an argument such as badarg($farg1, $farg2) is not valid, while
goodarg(“string, string”) is a valid argument.
Conditions
A condition is a Boolean expression associated with a CLASS statement that must be
satisfied so the current event matches the class. A condition has the format:
<var> <operator> <comp_value>
<var> is either an input variable or a substring of an input variable set in a previous
condition, such as:
$avariable
$anothervar[1]
<operator> is one of the operators listed in Table 12.
50
BMC Impact Event Adapters User Guide