Commit | Line | Data |
---|---|---|
44babf1f | 1 | package Moose::Meta::Method::Accessor::Native::Hash; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
245478d5 | 6 | our $VERSION = '1.19'; |
44babf1f | 7 | $VERSION = eval $VERSION; |
8 | our $AUTHORITY = 'cpan:STEVAN'; | |
9 | ||
8b9641b8 | 10 | use Moose::Role; |
44babf1f | 11 | |
12 | sub _inline_check_var_is_valid_key { | |
53a4677c | 13 | my $self = shift; |
14 | my ($var) = @_; | |
44babf1f | 15 | |
53a4677c | 16 | return ( |
17 | 'if (!defined(' . $var . ')) {', | |
18 | $self->_inline_throw_error( | |
1e2c801e | 19 | '"The key passed to ' . $self->delegate_to_method |
53a4677c | 20 | . ' must be a defined value"', |
21 | ) . ';', | |
22 | '}', | |
23 | ); | |
44babf1f | 24 | } |
25 | ||
8b9641b8 | 26 | no Moose::Role; |
27 | ||
44babf1f | 28 | 1; |