Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implement -M option

Currently only works for proper modules, not pragmas like fatal or
MONKEY_TYPING.

Also bumps NQP revision to get command line parser fixes
  • Loading branch information...
commit 93a44d74224b4d9235b47145324908d970455dd0 1 parent 97f9756
@moritz moritz authored
View
2  docs/ChangeLog
@@ -4,7 +4,7 @@ New in 2012.05
+ allow case insensitive regex matches without ICU in limited cases
+ %*ENV now propagates into subprocesses
+ RAKUDOLIB env variable supported in addition to PERL6LIB
-+ -I command line option
++ -I and -M command line options
+ $?LINE and $?FILE variables
New in 2012.04.1
View
10 src/Perl6/Grammar.pm
@@ -474,6 +474,16 @@ grammar Perl6::Grammar is HLL::Grammar {
$*W.install_lexical_symbol($*UNIT, '::?PACKAGE', $*PACKAGE);
$*DECLARAND := $*W.stub_code_object('Block');
}
+ my $M := %*COMPILING<%?OPTIONS><M>;
+ if pir::defined($M) {
+ for pir::does($M, 'array') ?? $M !! [$M] -> $longname {
+ my $module := $*W.load_module($/,
+ $longname,
+ $*GLOBALish);
+ do_import($module, []);
+ $/.CURSOR.import_EXPORTHOW($module);
+ }
+ }
}
<.finishpad>
View
1  src/main.nqp
@@ -26,6 +26,7 @@ sub MAIN(@ARGS) {
@clo.push('optimize=s?');
@clo.push('c');
@clo.push('I=s');
+ @clo.push('M=s');
# Set up END block list, which we'll run at exit.
my @*END_PHASERS := [];
View
2  tools/build/NQP_REVISION
@@ -1 +1 @@
-2012.04.1-1-gedd14da
+2012.04.1-13-g88f00e1
Please sign in to comment.
Something went wrong with that request. Please try again.