Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
$*ARGFILES initialization in a more logical place
  • Loading branch information
lizmat committed Nov 29, 2014
1 parent b78a931 commit 1db1c24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/core/Argfiles.pm
@@ -1,9 +1,3 @@
{
my @ARGS;
my Mu $argiter := nqp::getcurhllsym('$!ARGITER');
@ARGS.push(nqp::p6box_s(nqp::shift($argiter))) while $argiter;
nqp::bindkey(nqp::who(PROCESS), '@ARGS', @ARGS);
PROCESS::<$ARGFILES> = IO::ArgFiles.new(:args(@ARGS));
}
# placeholder file to facilitate switching between nom and newio branches

# vim: ft=perl6 expandtab sw=4
10 changes: 9 additions & 1 deletion src/core/IO/ArgFiles.pm
@@ -1,4 +1,4 @@
my class IO::ArgFiles is IO::Handle {
my class IO::ArgFiles {
has $.args;
has $.filename;
has $!io;
Expand Down Expand Up @@ -45,4 +45,12 @@ my class IO::ArgFiles is IO::Handle {
}
}

{
my @ARGS;
my Mu $argiter := nqp::getcurhllsym('$!ARGITER');
@ARGS.push(nqp::p6box_s(nqp::shift($argiter))) while $argiter;
nqp::bindkey(nqp::who(PROCESS), '@ARGS', @ARGS);
PROCESS::<$ARGFILES> = IO::ArgFiles.new(:args(@ARGS));
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 1db1c24

Please sign in to comment.