Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apply patch from sorear++ to further fix up loading modules from othe…
…r languages.
  • Loading branch information
jnthn committed Apr 30, 2010
1 parent 6e91b9b commit f31d524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Module/Loader.pm
Expand Up @@ -69,7 +69,7 @@ method need_foreign($name, %name_adverbs) {

# Perl6's two phase import mechanism complicates things slightly
# We need to remember the $lsm to we can get at the exports *later*
my $exports_closure := sub() {
my $exports_closure := pir::newclosure__PP(sub() {
# TODO: Import flags
my %raw_exports := $lsm.get_exports($mod);
my %exports;
Expand All @@ -81,14 +81,14 @@ method need_foreign($name, %name_adverbs) {
# TODO: Non-sub exports

%exports;
};
});
pir::setprop($ns, '!rakudo-export-closure', $exports_closure);

# XXX This alias wants to be lexical, but for now we put it into the
# namespace.
my @nsparts := pir::split__PSS('::', $name);
my $lastpart := @nsparts.pop;
pir::set_hll_global__vPSP(@nsparts, '&' ~ $lastpart, sub() { $mod });
pir::set_hll_global__vPSP(@nsparts, '&' ~ $lastpart, sub() { $ns });
pir::set_hll_global__vPSP(@nsparts, $lastpart, $ns);

return 1;
Expand Down

0 comments on commit f31d524

Please sign in to comment.