diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-10-10 12:33:00 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-10-10 12:34:10 -0500 |
commit | 5f8e55a79913581e5203a2ef0d4722b16091689b (patch) | |
tree | 63307379ca3cd8f078cb500f5af6f3c15466392e | |
parent | 5e7043884b8f139c2780ecfaf1d9673938a64c0d (diff) | |
download | bread-board-declare-5f8e55a79913581e5203a2ef0d4722b16091689b.tar.gz bread-board-declare-5f8e55a79913581e5203a2ef0d4722b16091689b.zip |
there is always an associated service now
-rw-r--r-- | lib/Bread/Board/Declare/Meta/Role/Attribute/Service.pm | 7 | ||||
-rw-r--r-- | lib/Bread/Board/Declare/Meta/Role/Class.pm | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/Bread/Board/Declare/Meta/Role/Attribute/Service.pm b/lib/Bread/Board/Declare/Meta/Role/Attribute/Service.pm index 1836c8f..795ae53 100644 --- a/lib/Bread/Board/Declare/Meta/Role/Attribute/Service.pm +++ b/lib/Bread/Board/Declare/Meta/Role/Attribute/Service.pm @@ -124,9 +124,8 @@ The service object that is associated with this attribute. =cut has associated_service => ( - is => 'rw', - does => 'Bread::Board::Service', - predicate => 'has_associated_service', + is => 'rw', + does => 'Bread::Board::Service', ); after attach_to_class => sub { @@ -186,7 +185,7 @@ after attach_to_class => sub { ); } - $self->associated_service($service) if $service; + $self->associated_service($service); }; after _process_options => sub { diff --git a/lib/Bread/Board/Declare/Meta/Role/Class.pm b/lib/Bread/Board/Declare/Meta/Role/Class.pm index 9aecb70..795e99d 100644 --- a/lib/Bread/Board/Declare/Meta/Role/Class.pm +++ b/lib/Bread/Board/Declare/Meta/Role/Class.pm @@ -21,7 +21,6 @@ Returns all of the services that are associated with attributes in this class. sub get_all_services { my $self = shift; return map { $_->associated_service } - grep { $_->has_associated_service } grep { Moose::Util::does_role($_, 'Bread::Board::Declare::Meta::Role::Attribute::Service') } $self->get_all_attributes; } |