Commit | Line | Data |
---|---|---|
44babf1f | 1 | package Moose::Meta::Method::Accessor::Native::Hash; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
8b9641b8 | 6 | use Moose::Role; |
44babf1f | 7 | |
8 | sub _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 | 22 | no Moose::Role; |
23 | ||
44babf1f | 24 | 1; |