Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace one use of nqp_get_package_through_who.

This op really needs to go away.
  • Loading branch information...
commit da26f1c22f0dea4beb895956837f84eac3e8d6a9 1 parent 28961ee
Jonathan Worthington jnthn authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/NQP/World.pm
12 src/NQP/World.pm
View
@@ -173,7 +173,17 @@ class NQP::World is HLL::World {
# Install symbol immediately.
my $target := $package;
for @sym {
- $target := pir::nqp_get_package_through_who__PPs($target, $_);
+ if nqp::existskey($target.WHO, $_) {
+ $target := nqp::atkey($target.WHO, $_);
+ }
+ else {
+ my $pkgtype := nqp::existskey(%*HOW, 'package')
+ ?? nqp::atkey(%*HOW, 'package')
+ !! nqp::atkey(%*HOW, 'knowhow');
+ my $pkg := $pkgtype.new_type(:name($_));
+ $pkg.HOW.compose($pkg);
+ $target := nqp::bindkey($target.WHO, $_, $pkg);
+ }
}
($target.WHO){$name} := $obj;
}
Please sign in to comment.
Something went wrong with that request. Please try again.