Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

First crack at updating BUILDPLAN handling for new approach to role a…

…ttributes.
  • Loading branch information...
commit d1e0b2b02368f5b50589e2dea6d5dc7c0e38241f 1 parent ab5f444
@jnthn jnthn authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/Perl6/Metamodel/BUILDPLAN.pm
View
6 src/Perl6/Metamodel/BUILDPLAN.pm
@@ -40,7 +40,8 @@ role Perl6::Metamodel::BUILDPLAN {
if $_.has_accessor {
my $attr_name := $_.name;
my $name := pir::substr__SSi($attr_name, 2);
- my $entry := [1, $class, $name, $attr_name];
+ my $pkg := pir::can__IPs($_, 'package') ?? $_.package !! $class;
+ my $entry := [1, $pkg, $name, $attr_name];
@all_plan[+@all_plan] := $entry;
if $i == 0 {
@plan[+@plan] := $entry;
@@ -54,7 +55,8 @@ role Perl6::Metamodel::BUILDPLAN {
if pir::can__IPs($_, 'build') {
my $default := $_.build;
if $default {
- my $entry := [2, $class, $_.name, $default];
+ my $pkg := pir::can__IPs($_, 'package') ?? $_.package !! $class;
+ my $entry := [2, $pkg, $_.name, $default];
@all_plan[+@all_plan] := $entry;
if $i == 0 {
@plan[+@plan] := $entry;
Please sign in to comment.
Something went wrong with that request. Please try again.