Permalink
Browse files

fix exporting of subroutines. jnthn++

  • Loading branch information...
1 parent 1ad9b40 commit c66c428cee75dcc28dcdf5140d6903105392d9d6 @moritz moritz committed May 3, 2013
Showing with 4 additions and 3 deletions.
  1. +1 −2 src/Perl6/Grammar.nqp
  2. +3 −1 src/Perl6/World.nqp
View
@@ -1243,8 +1243,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
my $result := $module<&EXPORT>(|@positional_imports);
my $EnumMap := $*W.find_symbol(['EnumMap']);
if nqp::istype($result, $EnumMap) {
- # TODO: decontainerize $result
- my $storage := nqp::getattr($result, $EnumMap, '$!storage');
+ my $storage := $result.hash.FLATTENABLE_HASH();
$*W.import($/, $storage, $package_source_name);
}
else {
View
@@ -474,7 +474,9 @@ class Perl6::World is HLL::World {
# actual static lexpad.
my $slp := self.get_static_lexpad($target);
for %to_install {
- $slp.add_static_value($_.key, $_.value, 0, 0);
+ my $v := $_.value;
+ if nqp::isnull(nqp::getobjsc($v)) { self.add_object($v); }
+ $slp.add_static_value($_.key, $v, 0, 0);
my $categorical := match($_.key, /^ '&' (\w+) ':<' (.+) '>' $/);
if $categorical {
$/.CURSOR.add_categorical(~$categorical[0], ~$categorical[1],

0 comments on commit c66c428

Please sign in to comment.