1 package Moose::Autobox::Hash;
2 use Moose::Role 'with';
6 with 'Moose::Autobox::Ref',
7 'Moose::Autobox::Indexed';
12 my ($hash, $key) = @_;
13 CORE::delete $hash->{$key};
16 # ::Indexed implementation
19 my ($hash, $index) = @_;
24 my ($hash, $index, $value) = @_;
25 $hash->{$index} = $value;
29 my ($hash, $key) = @_;
30 CORE::exists $hash->{$key};
35 [ CORE::keys %$hash ];
40 [ CORE::values %$hash ];
45 [ CORE::map { [ $_, $hash->{$_} ] } CORE::keys %$hash ];
56 Moose::Autobox::Hash - the Hash role
63 { one => 1, two => 2 }->keys->join(', ')->print; # prints 'one, two'
69 All complex software has bugs lurking in it, and this module is no
70 exception. If you find a bug please either email me, or add the bug
75 Stevan Little E<lt>stevan@iinteractive.comE<gt>
77 =head1 COPYRIGHT AND LICENSE
79 Copyright 2006 by Infinity Interactive, Inc.
81 L<http://www.iinteractive.com>
83 This library is free software; you can redistribute it and/or modify
84 it under the same terms as Perl itself.