summaryrefslogtreecommitdiffstats
path: root/lib/Bread/Board.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-12-29 14:55:39 -0600
committerJesse Luehrs <doy@tozt.net>2012-12-29 14:55:39 -0600
commit3829bb039a3ee5640c0d3e0cc00039fda85ce54a (patch)
treec9de9e8d3f719100c4345ec51be64debd3f8c1eb /lib/Bread/Board.pm
parent2674cfd2e9ff7a8b4f2952a5f84e94804afc3a1f (diff)
downloadp6-bread-board-3829bb039a3ee5640c0d3e0cc00039fda85ce54a.tar.gz
p6-bread-board-3829bb039a3ee5640c0d3e0cc00039fda85ce54a.zip
better workaround here
Diffstat (limited to 'lib/Bread/Board.pm')
-rw-r--r--lib/Bread/Board.pm19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/Bread/Board.pm b/lib/Bread/Board.pm
index c741757..13034ed 100644
--- a/lib/Bread/Board.pm
+++ b/lib/Bread/Board.pm
@@ -28,10 +28,7 @@ role Traversable {
return $root;
}
- # PERL6: doing anything at all with the type object for a role with
- # required methods is broken
- #method get_enclosing_container {...}
- method get_enclosing_container {}
+ method get_enclosing_container {...}
method _fetch (Str $path) {
return self if $path eq '';
@@ -45,20 +42,14 @@ role Traversable {
return self._fetch_single(@parts[0])._fetch($rest);
}
- # PERL6: doing anything at all with the type object for a role with
- # required methods is broken
- #method _fetch_single (Str $path) {...}
- method _fetch_single (Str $path) {}
+ method _fetch_single (Str $path) {...}
}
role Service does Traversable {
has Str $.name;
has $.lifecycle;
- # PERL6: doing anything at all with the type object for a role with
- # required methods is broken
- #method get {...}
- method get {}
+ method get {...}
method get_enclosing_container {
return $.parent;
@@ -146,9 +137,11 @@ class Dependency does Traversable {
# until the current object is completely constructed
method service handles 'get' {
# PERL6: // is broken on role type objects
+ # PERL6: also, have to use .DEFINITE instead of defined because calling
+ # most methods on role type objects with required methods blows up
#$!service //= self.fetch($.service_path);
$!service = self.fetch($.service_path)
- unless $!service.defined;
+ unless $!service.DEFINITE;
return $!service;
}