if ((type == OP_PUSH || type == OP_UNSHIFT)
&& !kid->op_sibling && ckWARN(WARN_MISC))
Perl_warner(aTHX_ WARN_MISC,
- "Useless use of %s with no arguments",
+ "Useless use of %s with no values",
PL_op_desc[type]);
if (kid->op_type == OP_CONST &&
(W) You did C<use re;> without any arguments. That isn't very useful.
+=item Useless use of %s with no values
+
+(W misc) You used the push() or unshift() function with no arguments
+apart from the array, like C<push(@x)> or C<unshift(@foo)>. That won't
+usually have any effect on the array, so is completely useless. It's
+possible in principle that push(@tied_array) could have some effect
+if the array is tied to a class which implements a PUSH method. If so,
+you can write it as C<push(@tied_array,())> to avoid this warning.
+
=item "use" not allowed in expression
(F) The "use" keyword is recognized and executed at compile time, and
assignment is executed, which is probably not what you want. (If it IS
what you want, put an & in front.)
-=item Useless use of %s with no arguments
-
-(W misc) You used the push() or unshift() function with no arguments
-apart from the array, like C<push(@x)> or C<unshift(@foo)>. That won't
-usually have any effect on the array, so is completely useless. It's
-possible in principle that push(@tied_array) could have some effect
-if the array is tied to a class which implements a PUSH method. If so,
-you can write it as C<push(@tied_array,())> to avoid this warning.
-
=back
=cut
push(@x);
unshift(@x);
EXPECT
-Useless use of push with no arguments at - line 4.
-Useless use of unshift with no arguments at - line 5.
+Useless use of push with no values at - line 4.
+Useless use of unshift with no values at - line 5.