summaryrefslogtreecommitdiff
path: root/pod/perlsub.pod
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2019-08-27 14:44:35 +1000
committerKarl Williamson <khw@cpan.org>2019-08-30 08:44:28 -0600
commit060b1fe22cc4067b315c065f639cae016660a485 (patch)
tree88376bc98ecfe3691d0a08a305d09053727ae7c0 /pod/perlsub.pod
parent3f1e98f5a21968dcf33fdecdc51b0ff9b485f86a (diff)
downloadperl-060b1fe22cc4067b315c065f639cae016660a485.tar.gz
(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.
Diffstat (limited to 'pod/perlsub.pod')
-rw-r--r--pod/perlsub.pod7
1 files changed, 6 insertions, 1 deletions
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