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:
Hash-ref.
Hash-ref of the source data for this hash. Will be used only for its keys.
Code-ref.
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.
$keyname
$value
If code throws an exception, the message will have added to it information about which data element caused it.
To install GraphQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GraphQL
CPAN shell
perl -MCPAN -e shell install GraphQL
For more information on module installation, please visit the detailed CPAN module installation guide.