summaryrefslogtreecommitdiffstats
path: root/lib/Bread/Board/Declare
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-10-10 12:33:00 -0500
committerJesse Luehrs <doy@tozt.net>2011-10-10 12:34:10 -0500
commit5f8e55a79913581e5203a2ef0d4722b16091689b (patch)
tree63307379ca3cd8f078cb500f5af6f3c15466392e /lib/Bread/Board/Declare
parent5e7043884b8f139c2780ecfaf1d9673938a64c0d (diff)
downloadbread-board-declare-5f8e55a79913581e5203a2ef0d4722b16091689b.tar.gz
bread-board-declare-5f8e55a79913581e5203a2ef0d4722b16091689b.zip
there is always an associated service now
Diffstat (limited to 'lib/Bread/Board/Declare')
-rw-r--r--lib/Bread/Board/Declare/Meta/Role/Attribute/Service.pm7
-rw-r--r--lib/Bread/Board/Declare/Meta/Role/Class.pm1
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;
}