summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c2
-rw-r--r--pod/perldiag.pod2
-rw-r--r--t/lib/warnings/op4
3 files changed, 4 insertions, 4 deletions
diff --git a/op.c b/op.c
index a0212bb4d6..4d5979a7da 100644
--- a/op.c
+++ b/op.c
@@ -2016,7 +2016,7 @@ Perl_scalar(pTHX_ OP *o)
break;
case OP_SORT:
- Perl_ck_warner(aTHX_ packWARN(WARN_VOID), "Useless use of sort in scalar context");
+ Perl_ck_warner(aTHX_ packWARN(WARN_SCALAR), "Useless use of sort in scalar context");
break;
case OP_KVHSLICE:
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index e448d0f284..7737c0ecff 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -7215,7 +7215,7 @@ so is futile.
=item Useless use of sort in scalar context
-(W void) You used sort in scalar context, as in :
+(W scalar) You used sort in scalar context, as in :
my $x = sort @y;
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 1437093151..3e7cdc58b3 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -477,9 +477,9 @@ Useless use of __SUB__ in void context at - line 61.
Useless use of anonymous array ([]) in void context at - line 62.
########
# op.c
-use warnings 'void' ; close STDIN ;
+use warnings 'scalar' ; close STDIN ;
my $x = sort (2,1,3);
-no warnings 'void' ;
+no warnings 'scalar' ;
$x = sort (2,1,3);
EXPECT
Useless use of sort in scalar context at - line 3.