NAME
Net::FreeIPA::Convert provides type conversion for Net::FreeIPA
Public methods
- rpc_api
-
Before calling the rpc, convert args and option to their respective JSON type
Arguments are
- command: the RPC command (passed to rpc method)
- args: arrayref with arguments
- args_names: arrayref with argument names (same order as
args
) - args_types: arrayref with argument types (same order as
args
) - opts: hashref with the options
- opts_keys: arrayref with valid option keys. (All options starting with
__
are passed as options toNet::FreeIPA::RPC::rpc
, with__
prefix removed). - opts_types: arrayref with option types (same order as
opts_keys
).
Calls rpc with args refarray and opts hashref after conversion.
- check_type
-
Given
value
, usetypedata
to do some preliminary type check, before converting.In case of failure, log an error message using
emsg
prefix.The typdate is a :-separated string with fields
Returns undef on failure, arrayref with original value and type to convert to otherwise
- convert
-
Convert/cast value to type
If a type is not found in the dispatch tabel, log a warning and return the value as-is.