NAME

Pcore::Util::Hash::HashArray - efficiently access hash values using pop, shift or array index.

SYNOPSIS

my $hash = Pcore::Util::Hash::HashArray->new;

$hash->{1} = 'v1';
$hash->{2} = 'v2';
$hash->{3} = 'v3';

say dump [ keys $hash->%* ];
say dump [ values $hash->%* ];

say $hash->[1];
say shift $hash->@*;
say pop $hash->@*;

say $hash->rand_key;
say $hash->rand_val;

DESCRIPTION

Efficiently access hash values using pop, shift or array index.

$hash->[$idx] works much faster, than standard ( values $hash->%* )[$idx].

ATTRIBUTES

METHODS

SEE ALSO