1. {
  2. my %ENV;
  3. my Mu $env := nqp::getenvhash();
  4. my Mu $enviter := nqp::iterator($env);
  5. my $envelem;
  6. my $key;
  7. while $enviter {
  8. $envelem := nqp::shift($enviter);
  9. $key = nqp::p6box_s(nqp::iterkey_s($envelem));
  10. %ENV{$key} = val(nqp::p6box_s(nqp::iterval($envelem)));
  11. }
  12. PROCESS::<%ENV> := %ENV;
  13. }
  14. Rakudo::Internals.REGISTER-DYNAMIC: '$*CWD', {
  15. # PROCESS::<$CWD> = nqp::p6box_s(nqp::cwd());
  16. my $CWD := nqp::p6box_s(nqp::cwd());
  17. PROCESS::<$CWD> = IO::Path.new($CWD, :$CWD); # need :CWD to prevent looping
  18. }