summaryrefslogtreecommitdiffstats
path: root/lib/Bread/Board.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bread/Board.pm')
-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;
}