1 package MooseX::AttributeHelpers::MethodProvider::ImmutableHash;
5 our $AUTHORITY = 'cpan:STEVAN';
8 my ($attr, $reader, $writer) = @_;
9 return sub { CORE::exists $reader->($_[0])->{$_[1]} ? 1 : 0 };
13 my ($attr, $reader, $writer) = @_;
14 return sub { $reader->($_[0])->{$_[1]} };
18 my ($attr, $reader, $writer) = @_;
19 return sub { CORE::keys %{$reader->($_[0])} };
23 my ($attr, $reader, $writer) = @_;
24 return sub { CORE::values %{$reader->($_[0])} };
28 my ($attr, $reader, $writer) = @_;
30 my $h = $reader->($_[0]);
38 my ($attr, $reader, $writer) = @_;
39 return sub { scalar CORE::keys %{$reader->($_[0])} };
43 my ($attr, $reader, $writer) = @_;
44 return sub { scalar CORE::keys %{$reader->($_[0])} ? 1 : 0 };
55 MooseX::AttributeHelpers::MethodProvider::ImmutableHash
59 This is a role which provides the method generators for
60 L<MooseX::AttributeHelpers::Collection::ImmutableHash>.
70 =head1 PROVIDED METHODS
92 All complex software has bugs lurking in it, and this module is no
93 exception. If you find a bug please either email me, or add the bug
98 Stevan Little E<lt>stevan@iinteractive.comE<gt>
100 =head1 COPYRIGHT AND LICENSE
102 Copyright 2007 by Infinity Interactive, Inc.
104 L<http://www.iinteractive.com>
106 This library is free software; you can redistribute it and/or modify
107 it under the same terms as Perl itself.