1. Rakudo::Internals.REGISTER-DYNAMIC: '@*ARGS', {
  2. my @ARGS;
  3. my Mu $argiter := nqp::getcurhllsym('$!ARGITER');
  4. @ARGS.push(nqp::p6box_s(nqp::shift($argiter))) while $argiter;
  5. PROCESS::<@ARGS> := @ARGS;
  6. }
  7. Rakudo::Internals.REGISTER-DYNAMIC: '$*ARGFILES', {
  8. # Here, we use $*IN's attributes to init the arg files because
  9. # the $*ARGFILES won't get instantiated until first access and by that
  10. # time the user may have already modified $*IN's attributes to their liking
  11. PROCESS::<$ARGFILES> = @*ARGS
  12. ?? IO::ArgFiles.new(@*ARGS)
  13. !! IO::ArgFiles.new:
  14. (my $in := $*IN),
  15. :nl-in($in.nl-in), :chomp($in.chomp),
  16. :encoding($in.encoding), :bin(nqp::isfalse($in.encoding));
  17. }