NAME

HashDataRole::Source::Array - Get hash data from a Perl array

VERSION

This document describes version 0.001 of HashDataRole::Source::Array (from Perl distribution HashDataRoles-Standard), released on 2021-05-21.

SYNOPSIS

my $hd = HashData::Array->new(array => [["one","satu"], ["two","dua"], ["three","tiga"]]);

DESCRIPTION

This role retrieves hash items from a Perl array. Each array element must in turn be a two-element array.

get_next_item() and get_item_at_pos() will return a pair of [$key, $value]. get_item_at_key() will return just the pair value.

Internally, a hash will be constructed from the array for quick lookup of key.

ROLES MIXED IN

HashDataRole::Spec::Basic

Role::TinyCommons::Collection::GetItemByPos

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/HashDataRoles-Standard.

SOURCE

Source repository is at https://github.com/perlancar/perl-HashDataRoles-Standard.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/perlancar/perl-HashDataRoles-Standard/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

HashData

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.