make github the primary repository
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash.pm
CommitLineData
44babf1f 1package Moose::Meta::Method::Accessor::Native::Hash;
2
3use strict;
4use warnings;
5
8b9641b8 6use Moose::Role;
44babf1f 7
8sub _inline_check_var_is_valid_key {
53a4677c 9 my $self = shift;
10 my ($var) = @_;
44babf1f 11
53a4677c 12 return (
13 'if (!defined(' . $var . ')) {',
14 $self->_inline_throw_error(
1e2c801e 15 '"The key passed to ' . $self->delegate_to_method
53a4677c 16 . ' must be a defined value"',
17 ) . ';',
18 '}',
19 );
44babf1f 20}
21
8b9641b8 22no Moose::Role;
23
44babf1f 241;