GraphQL::Role::HashMappable(3pm) | User Contributed Perl Documentation | GraphQL::Role::HashMappable(3pm) |
GraphQL::Role::HashMappable - GraphQL object role
with qw(GraphQL::Role::HashMappable); # or runtime Role::Tiny->apply_roles_to_object($foo, qw(GraphQL::Role::HashMappable));
Provides method for mapping code over a hash-ref.
Given a hash-ref, returns a modified copy of the data. Returns undef if given that. Parameters:
Each value will be the original value returned by the given code-ref, which is called with $keyname, $value. Will call the code for all given keys, but not copy over any values not existing in original item.
If code throws an exception, the message will have added to it information about which data element caused it.
2022-03-27 | perl v5.34.0 |