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
[PATCH] Typo in perlsub.pod #17129
Comments
From Valeriy.Kireev@Tune-IT.RuCreated by Valeriy.Kireev@Tune-IT.RuThere is small typo in pod/perlsub.pod, "IIF" used instead of "if". The patch Perl Info
|
From Valeriy.Kireev@Tune-IT.Ru0001-Fix-typo-in-perlsub.pod.patchFrom 87896f8d8352e11c8525be96f3c4e573c8240b89 Mon Sep 17 00:00:00 2001
From: Valeriy Kireev <kk@tune-it.ru>
Date: Thu, 15 Aug 2019 17:21:33 +0300
Subject: [PATCH] Fix typo in perlsub.pod
---
pod/perlsub.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 4571cbcc21..829e486ee7 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -224,7 +224,7 @@ X<recursion>
&foo(); # the same
&foo; # foo() get current args, like foo(@_) !!
- foo; # like foo() IFF sub foo predeclared, else "foo"
+ foo; # like foo() if sub foo predeclared, else "foo"
Not only does the C<&> form make the argument list optional, it also
disables any prototype checking on arguments you do provide. This
--
2.20.1
|
From @jkeenanOn Thu, 15 Aug 2019 16:02:45 GMT, Valeriy.Kireev@Tune-IT.Ru wrote:
There are places in the Perl 5 core distribution (and elsewhere in the tech world) where the string "IFF" means "if and only if". Could this be one of those places? If so, then we would not apply the patch. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @GrinnzOn Thu, 15 Aug 2019 09:23:33 -0700, jkeenan wrote:
Yes, I think this is correct. |
From @jkeenanOn Thu, 15 Aug 2019 16:31:06 GMT, grinnz@gmail.com wrote:
Okay, given that at least one user found the documentation confusing, and given the fact that I had to ack the repository to locate other instances of 'IFF' to confirm my hunch, then I think we can conclude that the documentation is sub-optimal ... even though it's been there since perl-5.4 in 1997. The longer I stare at it, the more I feel I don't know what the 'else "foo"' part means. If I knew what 'else "foo"' meant, I'd work that into a rewording something like this: ##### |
From Valeriy.Kireev@Tune-IT.RuI didn't know about "IFF" abbreviation. So, I suppose, this misunderstanding is On 8/15/19 10:45 PM, James E Keenan via RT wrote:
-- |
From @khwilliamsonOn 8/16/19 3:55 AM, Valeriy Kireev wrote:
I agree. I have, BTW, never seen iff expressed in caps before. Since
|
From @jkeenanOn Fri, 16 Aug 2019 17:04:34 GMT, public@khwilliamson.com wrote:
Okay. So, how would I fill in the blank after 'otherwise' above? Thank you very much. |
From @GrinnzOn Mon, Aug 19, 2019 at 8:28 AM James E Keenan via RT <
It means it is otherwise interpreted as a bareword string "foo", though I'm -Dan |
From @tonycozOn Mon, 19 Aug 2019 07:11:15 -0700, grinnz@gmail.com wrote:
Something like this? Tony |
From @tonycoz0001-perl-134365-IFF-iff-and-talk-about-strict-a-bit.patchFrom db00119e98b01091245710e1d20943e7d3fe3fff Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Tue, 27 Aug 2019 14:44:35 +1000
Subject: (perl #134365) IFF -> iff and talk about strict a bit
The IFF can be confusing, since "iff" for "if and only if" is
normally presented in lower case.
Since we really want people using strict, firstly tell users about
the behaviour under strict.
---
pod/perlsub.pod | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 4571cbcc21..b5c05d274e 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -224,7 +224,12 @@ X<recursion>
&foo(); # the same
&foo; # foo() get current args, like foo(@_) !!
- foo; # like foo() IFF sub foo predeclared, else "foo"
+ use strict 'subs';
+ foo; # like foo() iff sub foo predeclared, else
+ # a compile-time error
+ no strict 'subs';
+ foo; # like foo() iff sub foo predeclared, else
+ # a literal string "foo"
Not only does the C<&> form make the argument list optional, it also
disables any prototype checking on arguments you do provide. This
--
2.11.0
|
From @khwilliamsonI applied Tony's patch Thanks Valeriy for finding and reporting this, and your initial patch -- |
@khwilliamson - Status changed from 'open' to 'pending release' |
Migrated from rt.perl.org#134365 (status was 'pending release')
Searchable as RT134365$
The text was updated successfully, but these errors were encountered: