reply = $object->invoke( $operation, ... arguments ... );

The invoke() method calls the named repository class operation on the object.

The arguments passed should be as expected by the operation. If the operation returns a scalar value, the call should be called in a scalar context. If it returns an array, it should be invoked in an array context.

Note:

The preferred way of achieving the same result is to use the operation name directly. Thus, the following are equivalent but the latter is preferred.

 $obj->invoke( "makePort", "1.0", "First port", "Port" );
 $obj->makePort( "1.0", "First port", "Port" );

You can also use the invoke_t() method, described in “invoke_t” on page 36 to return additional information.