summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1997-05-16 10:15:00 +1200
committerChip Salzenberg <chip@atlantic.net>1997-05-16 10:15:00 +1200
commita00c1fe511e2428fef6e71b4b7d1feb78dff9aa3 (patch)
tree697eaca4958efc8d4b6c5f786922cd2c15ed9308
parent1615ca71795d97403e49ca42cacc39b5dbdeeb5e (diff)
downloadperl-a00c1fe511e2428fef6e71b4b7d1feb78dff9aa3.tar.gz
Note that DATA filehandle is unavailable during BEGIN {}
(this is the same change as commit 1d79a27f835368158fa27370bebb63728faf77b2, but as applied)
-rw-r--r--pod/perldata.pod5
1 files changed, 4 insertions, 1 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod
index 0dbb92afa5..38d5e9380d 100644
--- a/pod/perldata.pod
+++ b/pod/perldata.pod
@@ -296,7 +296,10 @@ ignored, but may be read via a DATA filehandle: main::DATA for __END__,
or PACKNAME::DATA (where PACKNAME is the current package) for __DATA__.
The two control characters ^D and ^Z are synonyms for __END__ (or
__DATA__ in a module). See L<SelfLoader> for more description of
-__DATA__, and an example of its use.
+__DATA__, and an example of its use. Note that you cannot read from the
+DATA filehandle in a BEGIN block: the BEGIN block is executed as soon as
+it is seen (during compilation), at which point the corresponding
+__DATA__ (or __END__) token has not yet been seen.
A word that has no other interpretation in the grammar will
be treated as if it were a quoted string. These are known as