diff options
Diffstat (limited to 'lib/Bread')
-rw-r--r-- | lib/Bread/Board/Declare/Meta/Role/Attribute.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Bread/Board/Declare/Meta/Role/Attribute.pm b/lib/Bread/Board/Declare/Meta/Role/Attribute.pm index f6584ae..a6114ea 100644 --- a/lib/Bread/Board/Declare/Meta/Role/Attribute.pm +++ b/lib/Bread/Board/Declare/Meta/Role/Attribute.pm @@ -226,7 +226,11 @@ if (Moose->VERSION > 1.9900) { . 'else {' . "\n" . '$val = ' . $instance . '->get_service(\'' . $self->name . '\')->get;' . "\n" . join("\n", $self->_inline_check_constraint( - '$val', '$type_constraint', '$type_constraint_obj' + '$val', + '$type_constraint', + (Moose->VERSION >= 2.0100 + ? '$type_message' + : '$type_constraint_obj'), )) . "\n" . '}' . "\n" . '$val' . "\n" |