summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2000-12-15 22:14:31 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2000-12-15 22:14:31 +0000
commit9ad0568745f6fe01e5fc04f7d23be449d0c377a4 (patch)
tree3a1dbd9cb1a8f0456fa0cbaadc88bf7f3f7ddaf3 /pod/perlfunc.pod
parent18b7339f76ca9f2454845b454e0d2168c487e8ee (diff)
parentf9172815abf2357cc8661dd092b8830b9ecd8186 (diff)
downloadperl-9ad0568745f6fe01e5fc04f7d23be449d0c377a4.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@8140
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod10
1 files changed, 8 insertions, 2 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 06d3b1da2d..ed3f2dc6a3 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -923,7 +923,10 @@ element to return happens to be C<undef>.
You may also use C<defined(&func)> to check whether subroutine C<&func>
has ever been defined. The return value is unaffected by any forward
-declarations of C<&foo>.
+declarations of C<&foo>. Note that a subroutine which is not defined
+may still be callable: its package may have an C<AUTOLOAD> method that
+makes it spring into existence the first time that it is called -- see
+L<perlsub>.
Use of C<defined> on aggregates (hashes and arrays) is deprecated. It
used to report whether memory for that aggregate has ever been
@@ -1479,7 +1482,10 @@ it exists, but the reverse doesn't necessarily hold true.
Given an expression that specifies the name of a subroutine,
returns true if the specified subroutine has ever been declared, even
if it is undefined. Mentioning a subroutine name for exists or defined
-does not count as declaring it.
+does not count as declaring it. Note that a subroutine which does not
+exist may still be callable: its package may have an C<AUTOLOAD>
+method that makes it spring into existence the first time that it is
+called -- see L<perlsub>.
print "Exists\n" if exists &subroutine;
print "Defined\n" if defined &subroutine;