New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"say" docs misleading #17100
Comments
From @haukexHi, perlfunc says "`say LIST` is simply an abbreviation for `{ local $\ = $ perl -MData::Dumper -E 'sub x{Dumper( $ perl -MData::Dumper -E 'sub x{Dumper($\)}say(x())' So I think the documentation is incorrect. I always thought `say LIST` was $ perl -E '$\="y"; print "x"; say "z"' Thanks, Regards, |
From @GrinnzOn Sat, 20 Jul 2019 00:55:51 -0700, haukex@zero-g.net wrote:
It's definitely misleading, but I think the intent was to say that it's like setting `local -Dan |
The RT System itself - Status changed from 'new' to 'open' |
From @GrinnzOn Sat, 20 Jul 2019 08:26:02 -0700, grinnz@gmail.com wrote:
Patch is attached. |
From @Grinnz0001-update-say-docs-to-better-represent-reality.patchFrom ef0c28a099eb447e341c2d841d18c1139d2a70be Mon Sep 17 00:00:00 2001
From: Dan Book <grinnz@grinnz.com>
Date: Sat, 20 Jul 2019 11:40:45 -0400
Subject: [PATCH] update say docs to better represent reality
---
pod/perlfunc.pod | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 0e50132907..066cd268db 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -6789,8 +6789,8 @@ X<say>
=for Pod::Functions +say output a list to a filehandle, appending a newline
Just like L<C<print>|/print FILEHANDLE LIST>, but implicitly appends a
-newline. C<say LIST> is simply an abbreviation for
-C<{ local $\ = "\n"; print LIST }>. To use FILEHANDLE without a LIST to
+newline at the end of the LIST instead of any value L<C<$\>|perlvar/$\>
+might have. To use FILEHANDLE without a LIST to
print the contents of L<C<$_>|perlvar/$_> to it, you must use a bareword
filehandle like C<FH>, not an indirect one like C<$fh>.
--
2.20.1
|
From @haukexHi, On Sat, 20 Jul 2019 08:26:02 -0700, grinnz@gmail.com wrote:
Oops, you're right of course! I do see more clearly what the current On Sat, 20 Jul 2019, Dan Book via RT wrote:
Looks good to me, thank you! Best, |
From @khwilliamsonThanks, applied as c3d72fb |
@khwilliamson - Status changed from 'open' to 'pending release' |
Migrated from rt.perl.org#134298 (status was 'pending release')
Searchable as RT134298$
The text was updated successfully, but these errors were encountered: