diff options
author | Johan Vromans <jvromans@squirrel.nl> | 2011-05-24 08:34:33 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-05-24 08:39:20 -0700 |
commit | bbc73fd9d4a79a3c013fa67ca4cec4c514c014f1 (patch) | |
tree | 2466529efed8b61be38ded1420b23983f2d638f1 | |
parent | 7f83d853f68b2a948ba84fe2d4b69d0654c06619 (diff) | |
download | perl-bbc73fd9d4a79a3c013fa67ca4cec4c514c014f1.tar.gz |
[perl #91508] __DATA__ starts reading on the next line
In pod/perldata it is described that the DATA filehandle starts
reading after the __DATA__ token. In reality, it starts reading on the
line following the __DATA__ token.
Example:
print while <DATA>; __DATA__ foo
bar
This prints "bar", not "foo\nbar".
The attached patch fixes the documentation in pod/perldata.pod.
-rw-r--r-- | pod/perldata.pod | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod index 77cd0c2b08..28e4eccc18 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -417,7 +417,7 @@ end of file. Any following text is ignored. Text after __DATA__ may be read via the filehandle C<PACKNAME::DATA>, where C<PACKNAME> is the package that was current when the __DATA__ token was encountered. The filehandle is left open pointing to the -contents after __DATA__. It is the program's responsibility to +line after __DATA__. It is the program's responsibility to C<close DATA> when it is done reading from it. For compatibility with older scripts written before __DATA__ was introduced, __END__ behaves like __DATA__ in the top level script (but not in files loaded with |