summaryrefslogtreecommitdiff
path: root/pod/perldiag.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-04-03 15:03:46 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-03 15:03:46 +0000
commitde4864e4e7ced178416488fa2591227064c3222d (patch)
treef321dcff676073bbabdd24fce7b8af6e753ca4a4 /pod/perldiag.pod
parent936edb8bce14c9708bc6198559047de5d7e6af47 (diff)
downloadperl-de4864e4e7ced178416488fa2591227064c3222d.tar.gz
Change the push/unshift warning (#9532) to talk about "no values"
instead of "no arguments". p4raw-id: //depot/perl@9534
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r--pod/perldiag.pod18
1 files changed, 9 insertions, 9 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 16b4ec2adc..038b93fe59 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -3682,6 +3682,15 @@ L<perlref> for more on this.
(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
@@ -3949,15 +3958,6 @@ which means that Perl 5 will try to call the subroutine when the
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