RESULT = $session->invokeOperation($object, $operation, \@args)

The invokeOperation() function is an alias for invoke(). The section “invoke” on page 98 provides additional information.


Use the features of the InCharge::object module instead, as described in Chapter 2, “InCharge::Object.”

The invokeOperation() function invokes a class operation on a specified object, passing the parameters to the operation.

The syntax of the arguments list requires it to be a reference to an array, each element of which is a reference to a two-element array containing the data type and value. Because of the awkward syntax, using the InCharge::object module provides a more natural style of interface. For example:

 $result = $session->invokeOperation(
    "Router::gw1", "makeInterface",
    [ "INT", 1 ],
    [ "STRING", "interface-1" ],
    [ "STRING", "Interface" ]
    ] );