From ef40738ae81ef6a8996d962e974f73024232dfef Mon Sep 17 00:00:00 2001
From: Timo Paulssen <[email protected]>
Date: Fri, 5 Apr 2013 04:37:35 +0200
Subject: [PATCH] .perl empty parcels to () or ().item now.
this fixes the erroneous output of $() for empty parcels in item context
---
src/core/Parcel.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/Parcel.pm b/src/core/Parcel.pm
index f695d7b..12bf46b 100644
--- a/src/core/Parcel.pm
+++ b/src/core/Parcel.pm
@@ -49,7 +49,7 @@ my class Parcel does Positional {
multi method perl(Parcel:D \SELF:) {
my Mu $rpa := nqp::clone($!storage);
- my $perl = nqp::iscont(SELF) ?? '$(' !! '(';
+ my $perl = '(';
if $rpa {
$perl = $perl ~ nqp::shift($rpa).perl;
if $rpa {
@@ -59,7 +59,7 @@ my class Parcel does Positional {
$perl = $perl ~ ',';
}
}
- $perl ~ ')';
+ $perl ~ (nqp::iscont(SELF) ?? ').item' !! ')');
}
method STORE(|) {
--
1.7.10.4