Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
move token @inc into EXPORT sub of Perl5::Terms
We bind special variables to the hash which gets exported, and
do the same technique for the English and Config module.
  • Loading branch information
FROGGS committed May 15, 2013
1 parent a88e1a0 commit 3355a22
Show file tree
Hide file tree
Showing 6 changed files with 1,233 additions and 63 deletions.
80 changes: 43 additions & 37 deletions STATUS.md

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions lib/Perl5/Actions.nqp
Expand Up @@ -1272,15 +1272,6 @@ class Perl5::Actions is HLL::Actions does STDActions {
@*UNQUOTE_ASTS.push($<statementlist>.ast);
}

method special_variable:sym<@INC>($/) {
$V5DEBUG && say("special_variable:sym<\@INC>($/)");

make QAST::Op.new( :op('callmethod'), :name('at_key'),
QAST::Op.new( :op('call'), :name('&DYNAMIC'), $*W.add_string_constant('%*CUSTOM_LIB') ),
QAST::SVal.new( :value('Perl5') )
);
}

method special_variable:sym<$0>($/) {
$V5DEBUG && say("special_variable:sym<\$0>($/)");
make QAST::Op.new( :op('call'), :name('&DYNAMIC'), $*W.add_string_constant('$*PROGRAM_NAME'))
Expand All @@ -1300,7 +1291,7 @@ class Perl5::Actions is HLL::Actions does STDActions {

method special_variable:sym<$/>($/) {
$V5DEBUG && say("special_variable:sym<\$/>($/)");
make QAST::Op.new( :op('call'), :name('&INPUT_RECORD_SEPARATOR') )
make QAST::Op.new( :op('call'), :name('&DYNAMIC'), $*W.add_string_constant('$*INPUT_RECORD_SEPARATOR'))
}

method special_variable:sym<$~>($/) {
Expand Down

0 comments on commit 3355a22

Please sign in to comment.