:sig
function unit_call(target : string, props : as dval = {}, request : capture dval) dval

:params
request : the caller's request, captured when omitted
target : compound "unit path:exported function name"
props : function input

:returns
exported function result

:content
`unit_call` calls an exported function in a unit. A form without `props` sends an empty map as the function input.

`target` names the unit and its export in one string, the same way `component()`, `component_render()`, and `task()` do. It splits on the first colon, so a handler name such as `COMPONENT:CARD` still works after a unit path.

Pass `props` as map entries, a map, a `dval`, or a scalar. `unit_call(target, greeting: "hello")` is equivalent to `unit_call(target, {greeting: "hello"})`. A string or number becomes a scalar `dval`.

The input is the caller's object and the result is the callee's object; nothing is copied. Handlers in the same request share the request value.

An `#import` alias calls the same exported functions with the path written once and the export name checked at compile time.

:example capy render
var direct := unit_call("/tests/capy-module-target.capy:echo", "hello")
var compound := unit_call("/tests/capy-module-target.capy:echo", greeting: "hello")
print(direct, " ", string(compound.greeting), "\n")

:see-group
units

:see
handler/render
handler/component
