diff options
Diffstat (limited to 'lib/Bread/Board/Declare/Meta/Role/Attribute.pm')
-rw-r--r-- | lib/Bread/Board/Declare/Meta/Role/Attribute.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Bread/Board/Declare/Meta/Role/Attribute.pm b/lib/Bread/Board/Declare/Meta/Role/Attribute.pm index c7d1477..d356e3a 100644 --- a/lib/Bread/Board/Declare/Meta/Role/Attribute.pm +++ b/lib/Bread/Board/Declare/Meta/Role/Attribute.pm @@ -1,9 +1,22 @@ package Bread::Board::Declare::Meta::Role::Attribute; use Moose::Role; +# ABSTRACT: base attribute metarole for Bread::Board::Declare use List::MoreUtils 'any'; use Moose::Util 'does_role', 'find_meta'; +=attr service + +Whether or not to create a service for this attribute. Defaults to true. + +=cut + +has service => ( + is => 'ro', + isa => 'Bool', + default => 1, +); + # this is kinda gross, but it's the only way to hook in at the right place # at the moment, it seems around interpolate_class => sub { @@ -16,7 +29,6 @@ around interpolate_class => sub { if $options->{metaclass}; if (exists $options->{service} && !$options->{service}) { - delete $options->{service}; return $class->$orig(@_); } |