Permalink
Browse files

Default strict to off in -e and REPL

  • Loading branch information...
1 parent 366c11d commit f437b48668602900670900cf33333d48c2c002c4 @sorear committed Mar 31, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/NieczaGrammar.pm6
View
@@ -42,6 +42,12 @@ grammar P6 is STD::P6 {
$*CURLEX<!sub>.set_return_pass;
$*CURLEX{'!sub'}.add_my_name('$_') if !$*settingref;
$*CURLEX{'!sub'}.set_signature($Sig.simple());
+
+ # XXX a bit of a hack
+ if $*FILE<name> eq ('(eval)' | '-e') && !$*niecza_outer_ref {
+ $*CURLEX<!sub>.set_extend('strict', False);
+ }
+
$*unit.set_mainline($*CURLEX<!sub>);
%*LANG<Q> = NieczaGrammar::Q ;

0 comments on commit f437b48

Please sign in to comment.