summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
Diffstat (limited to 'dist')
-rw-r--r--dist/B-Deparse/Deparse.pm12
-rw-r--r--dist/B-Deparse/t/deparse.t2
2 files changed, 8 insertions, 6 deletions
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm
index 2a768c0e5a..07386d5626 100644
--- a/dist/B-Deparse/Deparse.pm
+++ b/dist/B-Deparse/Deparse.pm
@@ -4726,19 +4726,19 @@ sub pp_subst {
my $flags = "";
my $pmflags = $op->pmflags;
if (null($op->pmreplroot)) {
- $repl = $self->dq($kid);
+ $repl = $kid;
$kid = $kid->sibling;
} else {
$repl = $op->pmreplroot->first; # skip substcont
- while ($repl->name eq "entereval") {
+ }
+ while ($repl->name eq "entereval") {
$repl = $repl->first;
$flags .= "e";
- }
- if ($pmflags & PMf_EVAL) {
+ }
+ if ($pmflags & PMf_EVAL) {
$repl = $self->deparse($repl->first, 0);
- } else {
+ } else {
$repl = $self->dq($repl);
- }
}
my $extended = ($pmflags & PMf_EXTENDED);
if (null $kid) {
diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t
index 3500d5b38c..d1c6cb0a1f 100644
--- a/dist/B-Deparse/t/deparse.t
+++ b/dist/B-Deparse/t/deparse.t
@@ -322,6 +322,8 @@ my $foo = "Ab\x{100}\200\x{200}\237Cd\000Ef\x{1000}\cA\x{2000}\cZ";
####
# s///e
s/x/'y';/e;
+s/x/$a;/e;
+s/x/complex_expression();/e;
####
# block
{ my $x; }