diff options
author | Ævar Arnfjörð Bjarmason <avar@cpan.org> | 2014-08-25 16:17:11 +0000 |
---|---|---|
committer | Ævar Arnfjörð Bjarmason <avar@cpan.org> | 2014-08-25 16:39:18 +0000 |
commit | d4a03217c39773dcacf83845e1f96a61136eb870 (patch) | |
tree | f65e6a091d79c13aae470d29cc3f5ea19186eb76 /pod/perlfunc.pod | |
parent | 35c2140b05a9a1683ea74d158942a454ab66b443 (diff) | |
download | perl-d4a03217c39773dcacf83845e1f96a61136eb870.tar.gz |
perlfunc: Improve the pointer from "elseif" to "elsif"
A co-worker pointed out that the docs for "elsif" were quite confusing
because nothing when you "perldoc -f elseif" points out that it doesn't
exist, it just directs you to perlsyn where we only document "elsif".
Ricardo Signes added this aliasing back in v5.15.7-194-g8f0d6a6.
Improve this confusion, and also add a mention of the common "elif" and
"else if" variants while I'm at it. I was originally going to just alias
them, but t/porting/perlfunc.t started failing because we're missing
cross-references, and unlike "elseif" the other two aren't keywords,
even if the "elseif" one is only here to warn you about its use.
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index d7693ed90e..ecf7be2669 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -9285,8 +9285,6 @@ This keyword is documented in L<perlsub/"Autoloading">. =item else -=item elseif - =item elsif =item for @@ -9303,6 +9301,15 @@ This keyword is documented in L<perlsub/"Autoloading">. These flow-control keywords are documented in L<perlsyn/"Compound Statements">. +=item elseif + +The "else if" keyword is spelled C<elsif> in Perl. There's no C<elif> +or C<else if> either. It does parse C<elseif>, but only to warn you +about not using it. + +See the documentation for flow-control keywords in L<perlsyn/"Compound +Statements">. + =back =over |