$priv{$_}{64} = "LOCALE"
for ("sort", "prtf", "sprintf", "slt", "sle", "seq", "sne", "sgt", "sge",
"scmp", "lc", "uc", "lcfirst", "ucfirst");
-@{$priv{"sort"}}{1,2,4} = ("NUM", "INT", "REV");
+@{$priv{"sort"}}{1,2,4,8} = ("NUM", "INT", "REV", "INPLACE");
$priv{"threadsv"}{64} = "SVREFd";
@{$priv{$_}}{16,32,64,128} = ("INBIN","INCR","OUTBIN","OUTCR")
for ("open", "backtick");
OPpLVAL_INTRO OPpOUR_INTRO OPpENTERSUB_AMPER OPpSLICE OPpCONST_BARE
OPpTRANS_SQUASH OPpTRANS_DELETE OPpTRANS_COMPLEMENT OPpTARGET_MY
OPpCONST_ARYBASE OPpEXISTS_SUB OPpSORT_NUMERIC OPpSORT_INTEGER
- OPpSORT_REVERSE
+ OPpSORT_REVERSE OPpSORT_INPLACE
SVf_IOK SVf_NOK SVf_ROK SVf_POK SVpad_OUR SVf_FAKE SVs_RMG SVs_SMG
CVf_METHOD CVf_LOCKED CVf_LVALUE CVf_ASSERTION
PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE PMf_SKIPWHITE
$expr = $self->deparse($kid, 6);
push @exprs, $expr;
}
+ if ($name eq "sort" && ($op->private & OPpSORT_INPLACE)) {
+ return "$exprs[0] = sort $indir $exprs[0]";
+ }
+
my $args = $indir . join(", ", @exprs);
if ($indir ne "" and $name eq "sort") {
# We don't want to say "sort(f 1, 2, 3)", since perl -w will