Data::Frame::Autobox::Hash - Additional Hash role for Moose::Autobox
version 0.0050_01
use Moose::Autobox; Moose::Autobox->mixin_additional_role( HASH => "Data::Frame::Autobox::Hash" ); { one => 1 }->names; # [ 'one' ] { one => 1 }->isempty; # false
This is an additional Hash role for Moose::Autobox.
my $isempty = $hash->isempty;
Returns a boolean value for if the hash ref is empty.
my $keys = $hash->names;
This is same as the keys method of Moose::Autobox::Hash.
keys
$hash->set($key, $value)
This is same as the put method of Moose::Autobox::Hash.
put
rename($hashref_or_coderef)
It can take either,
A hashref of key mappings.
If a keys does not exist in the mappings, it would not be renamed.
A coderef which transforms each key.
my $new_href1 = $href->rename( { $from_key => $to_key, ... } ); my $new_href2 = $href->rename( sub { $_[0] . 'foo' } );
Shallow copy.
Moose::Autobox
Moose::Autobox::Hash
Zakariyya Mughal <zmughal@cpan.org>
Stephan Loyd <sloyd@cpan.org>
This software is copyright (c) 2014, 2019 by Zakariyya Mughal, Stephan Loyd.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Alt::Data::Frame::ButMore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alt::Data::Frame::ButMore
CPAN shell
perl -MCPAN -e shell install Alt::Data::Frame::ButMore
For more information on module installation, please visit the detailed CPAN module installation guide.