summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-12-28 13:49:58 -0600
committerJesse Luehrs <doy@tozt.net>2012-12-28 13:49:58 -0600
commit005699bf2fb916ab532f360e37d190c1a7602ec7 (patch)
tree2cfd961b51b21cb437dc4dfb6f5a85226ebb1ecb
parentefe38cd988ef943f4e48ee056cdd15c881cd9460 (diff)
downloadp6-bread-board-005699bf2fb916ab532f360e37d190c1a7602ec7.tar.gz
p6-bread-board-005699bf2fb916ab532f360e37d190c1a7602ec7.zip
fix .service and .get on dependency objects
-rw-r--r--lib/Bread/Board.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Bread/Board.pm b/lib/Bread/Board.pm
index 7221b62..7a56200 100644
--- a/lib/Bread/Board.pm
+++ b/lib/Bread/Board.pm
@@ -136,13 +136,16 @@ role HasParameters {
class Dependency does Traversable {
has Str $.service_path;
- has Service $.service handles 'get';
+ has Service $.service;
# XXX is this the best way to do this?
# we can't do it at construction time, since $.parent doesn't get set
# until the current object is completely constructed
- method service {
- $!service //= self.fetch($.service_path);
+ method service handles 'get' {
+ # PERL6: // is broken on role type objects
+ #$!service //= self.fetch($.service_path);
+ $!service = self.fetch($.service_path)
+ unless $!service.defined;
return $!service;
}