summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-03-12 02:45:09 +0100
committerJames E Keenan <jkeenan@cpan.org>2022-03-14 07:17:54 -0400
commit7e37a5ec67cea60cb18a6d77313c715a9ee1577e (patch)
tree50d8cbb84bfae8dfd5e4277d7754bc373730b09a /pod/perlfunc.pod
parentd6b487cec2690eccc59f18bd6c3803ea06b3c9d6 (diff)
downloadperl-7e37a5ec67cea60cb18a6d77313c715a9ee1577e.tar.gz
Revert "Fix GH Issue #19472: read warnings from open($fh,">",\(my $x))"
This reverts commit 8b03aeb95ab72abdb2fa40f2d1196ce42f34708d. This is causing BBC breakage, and its unimport and grey zone enough that we can pick it up in 5.37 when we have more time to deal with it.
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod12
1 files changed, 2 insertions, 10 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 1950e95cd0..26d59a580e 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4657,8 +4657,8 @@ L<C<seek>|/seek FILEHANDLE,POSITION,WHENCE> to do the reading.
=item Opening a filehandle into an in-memory scalar
You can open filehandles directly to Perl scalars instead of a file or
-other resource external to the program. To do so, provide an unblessed
-reference to that scalar as the third argument to C<open>, like so:
+other resource external to the program. To do so, provide a reference to
+that scalar as the third argument to C<open>, like so:
open(my $memory, ">", \$var)
or die "Can't open memory file: $!";
@@ -4674,14 +4674,6 @@ The scalars for in-memory files are treated as octet strings: unless
the file is being opened with truncation the scalar may not contain
any code points over 0xFF.
-Be aware that attempting to open a reference to a readonly scalar will
-cause a warning and the open to fail.
-
-Prior to Perl version 5.36.0, passing in a reference to an undef scalar
-could cause strange warnings. As of Perl version 5.36.0, provided the
-reference is unblessed, the scalar will be "autovivified" to be an empty
-string, even for read mode open operations.
-
Opening in-memory files I<can> fail for a variety of reasons. As with
any other C<open>, check the return value for success.