Permalink
Browse files

implement .{$key}:p and :kv

  • Loading branch information...
1 parent 2d6b306 commit bc2a1450660ac221812de64e081447ffeef2bf9b @moritz moritz committed Feb 24, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/SAFE.setting
View
@@ -770,9 +770,11 @@ sub postcircumfix:<[ ]>(\$container, $index) {
$container.at-pos($index)
}
-sub postcircumfix:<{ }>(\$container, $key, :$exists, :$delete) {
+sub postcircumfix:<{ }>(\$container, $key, :$exists, :$delete, :$p, :$kv) {
$exists ?? $container.exists-key($key) !!
$delete ?? $container.delete-key($key) !!
+ $p ?? $key => $container.at-key($key) !!
+ $kv ?? $key, $container.at-key($key) !!
$container.at-key($key)
}

0 comments on commit bc2a145

Please sign in to comment.