Skip to content

Instantly share code, notes, and snippets.

@ShimmerFairy
Created July 6, 2010 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShimmerFairy/465939 to your computer and use it in GitHub Desktop.
Save ShimmerFairy/465939 to your computer and use it in GitHub Desktop.
Note: please check gist #463775 first before applying this patch.
From 7a8bc356f02078fc0fa81ecf5c50579312c55f30 Mon Sep 17 00:00:00 2001
From: Matthew (lue) <rnddim@gmail.com>
Date: Tue, 6 Jul 2010 14:20:35 -0700
Subject: [PATCH] Change := to deal with arrays and hashes better.
---
src/core/operators.pm | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/core/operators.pm b/src/core/operators.pm
index 40300e0..154b75e 100644
--- a/src/core/operators.pm
+++ b/src/core/operators.pm
@@ -295,6 +295,11 @@ our multi infix:<:=>(Mu \$target, Mu \$source) {
}
}
+ #and now, for the actual -- Ha ha! Not yet, checking for WHENCE first.
+ if !pir::isnull(pir::getprop__PsP('WHENCE', pir::descalarref__PP($target))) {
+ pir::getprop__PsP('WHENCE', pir::descalarref__PP($target)).();
+ }
+
#and now, for the actual process
pir::copy__vvpp($target, pir::new__ppp('ObjectRef', $source));
$target;
@@ -313,7 +318,7 @@ our multi infix:<::=>(Mu \$target, Mu \$source) {
$target := $source;
#XX pay attention to this little guy, we don't quite understand or are
#able to implement the full details of ::=
- pir::delprop__vPs($target, 'rw');
+ pir::delprop__0Ps($target, 'rw');
}
# XXX Wants to be a macro when we have them.
--
1.6.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment