summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_sort.c')
-rw-r--r--pp_sort.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pp_sort.c b/pp_sort.c
index 2257d2f8c9..d527d1e7e8 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1525,11 +1525,11 @@ PP(pp_sort)
hasargs = TRUE;
}
}
- if (!(cv && CvROOT(cv))) {
- if (cv && CvISXSUB(cv)) {
- is_xsub = 1;
- }
- else if (gv) {
+ if (cv && CvISXSUB(cv) && CvXSUB(cv)) {
+ is_xsub = 1;
+ }
+ else if (!(cv && CvROOT(cv))) {
+ if (gv) {
goto autoload;
}
else if (!CvANON(cv) && (gv = CvGV(cv))) {