From 060b1fe22cc4067b315c065f639cae016660a485 Mon Sep 17 00:00:00 2001 From: Tony Cook 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(-) (limited to 'pod/perlsub.pod') 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 &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 -- cgit v1.2.1