sub pp_null {
my $self = shift;
- my($op, $cx) = @_;
+ my($op, $cx, $flags) = @_;
if (class($op) eq "OP") {
# old value is lost
return $self->{'ex_const'} if $op->targ == OP_CONST;
. $self->deparse($op->first->sibling, 20),
$cx, 20);
} elsif ($op->flags & OPf_SPECIAL && $cx == 0 && !$op->targ) {
- return "do {\n\t". $self->deparse($op->first, $cx) ."\n\b};";
+ if ($flags) {
+ return $self->deparse($op->first, $cx);
+ }
+ else {
+ return "do {\n\t". $self->deparse($op->first, $cx) ."\n\b};";
+ }
} elsif (!null($op->first->sibling) and
$op->first->sibling->name eq "null" and
class($op->first->sibling) eq "UNOP" and
$flags .= "e";
}
if ($op->pmflags & PMf_EVAL) {
- $repl = $self->deparse($repl, 0);
+ $repl = $self->deparse($repl, 0, 1);
} else {
$repl = $self->dq($repl);
}