summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorSimon Cozens <simon@netthink.co.uk>2000-12-28 20:33:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-28 21:52:42 +0000
commitd804643f1d3e26c9c696bb1ebe8344dd5f1c8f6d (patch)
tree62c294e518d95ff78b72649c44e4f49b5eec3a30 /pod
parent0d73d187eb6a7f76dde07ae608622944dbccd4e9 (diff)
downloadperl-d804643f1d3e26c9c696bb1ebe8344dd5f1c8f6d.tar.gz
Re: [PATCH] Warn on use of reference as array elem
Message-ID: <20001228203313.A2607@deep-dark-truthful-mirror.perlhacker.org> p4raw-id: //depot/perl@8234
Diffstat (limited to 'pod')
-rw-r--r--pod/perldiag.pod9
1 files changed, 9 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index abbdea7aa3..be1592655c 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -3710,6 +3710,15 @@ old way has bad side effects.
(D deprecated) This was an ill-advised attempt to emulate a poorly
defined B<awk> feature. Use an explicit printf() or sprintf() instead.
+=item Use of reference "%s" in array index
+
+(W) You tried to use a reference as an array index; this probably
+isn't what you mean, because references tend to be huge numbers which
+take you out of memory, and so usually indicates programmer error.
+
+If you really do mean it, explicitly numify your reference, like so:
+C<$array[0+$ref]>
+
=item Use of reserved word "%s" is deprecated
(D deprecated) The indicated bareword is a reserved word. Future