From 7e37a5ec67cea60cb18a6d77313c715a9ee1577e Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Sat, 12 Mar 2022 02:45:09 +0100 Subject: 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. --- pod/perlfunc.pod | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'pod/perlfunc.pod') 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|/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, like so: +other resource external to the program. To do so, provide a reference to +that scalar as the third argument to C, 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 fail for a variety of reasons. As with any other C, check the return value for success. -- cgit v1.2.1