Skip to content

Commit

Permalink
Add back %*INC settings, clean up code generation slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed May 28, 2009
1 parent 4e3a1e8 commit 10707f1
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions build/gen_setting_pm.pl
Expand Up @@ -28,25 +28,14 @@
}

print <<"END_SETTING";
# Need to use all built-in classes, to import their exports.
# Need to import all built-in classes and set \%*INC for each.
sub SETTING_INIT() {
END_SETTING
s/\\/\//g for @classes;
print join('', map {
my $colon_form = $_;
$colon_form =~ s/[\/\\]/::/g;
" Perl6::Compiler.import('$colon_form', ':DEFAULT', ':MANDATORY');\n"
" \%*INC<$_> = 1;\n Perl6::Compiler.import('$colon_form', ':DEFAULT', ':MANDATORY');\n"
} @classes);
print "}\n";

# Why yes, "OMFG" is a correct response to this hack. We need to make sure
# that we set up %*INC properly for the pre-compiled case, and can't use
# BEGIN blocks to preserve those changes for now.
#print <<"END_SETTING";
#Q:PIR {
# .return (1)
#.end
#.sub '' :load :init
#};
#END_SETTING
#print join('', map { "\%*INC<$_> = 1;\n" } @classes);

0 comments on commit 10707f1

Please sign in to comment.