Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'setenv' into nom

  • Loading branch information...
commit 110f35cce02bff36428407ef715cbb9245c88130 2 parents 2a962e3 + 616b622
Tadeusz Sośnierz tadzik authored

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +12 0 src/core/terms.pm
12 src/core/terms.pm
@@ -15,6 +15,18 @@ sub term:<time>() { nqp::p6box_i(pir::time__I()) }
15 15 $key = nqp::p6box_s(pir::shift__SP($enviter));
16 16 %ENV{$key} = nqp::p6box_s(nqp::atkey($env, nqp::unbox_s($key)));
17 17 }
  18 + %ENV does role {
  19 + method at_key($k) {
  20 + Proxy.new(
  21 + FETCH => {
  22 + nqp::p6box_s(nqp::atkey($env, nqp::unbox_s($k)))
  23 + },
  24 + STORE => -> $, $v {
  25 + nqp::bindkey($env, nqp::unbox_s($k), nqp::unbox_s($v))
  26 + }
  27 + )
  28 + }
  29 + }
18 30 nqp::bindkey(pir::get_who__PP(PROCESS), '%ENV', %ENV);
19 31
20 32 my $VM = {

0 comments on commit 110f35c

Please sign in to comment.
Something went wrong with that request. Please try again.