summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Brine <ikegami@adaelis.com>2012-03-02 18:47:39 -0800
committerRicardo Signes <rjbs@cpan.org>2012-03-05 11:03:42 -0500
commit4642e50d936f507ad436fe48093d9efae111f983 (patch)
tree34f180d005e55377581db7657aa44bb0afccd451
parent9590a7cd37f06922f07d87081a2fdf6a96c22b56 (diff)
downloadperl-4642e50d936f507ad436fe48093d9efae111f983.tar.gz
fix documentation for exec's warning behavior
This should self-consistently and correctly identify when exec will warn. [ commit message rewritten by rjbs ]
-rw-r--r--pod/perlfunc.pod8
1 files changed, 4 insertions, 4 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 4fd0a3a501..08db117d51 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -1944,10 +1944,10 @@ returns false only if the command does not exist I<and> it is executed
directly instead of via your system's command shell (see below).
Since it's a common mistake to use C<exec> instead of C<system>, Perl
-warns you if there is a following statement that isn't C<die>, C<warn>,
-or C<exit> (if C<-w> is set--but you always do that, right?). If you
-I<really> want to follow an C<exec> with some other statement, you
-can use one of these styles to avoid the warning:
+warns you if C<exec> is called in void context and if there is a following
+statement that isn't C<die>, C<warn>, or C<exit> (if C<-w> is set--but
+you always do that, right?). If you I<really> want to follow an C<exec>
+with some other statement, you can use one of these styles to avoid the warning:
exec ('foo') or print STDERR "couldn't exec foo: $!";
{ exec ('foo') }; print STDERR "couldn't exec foo: $!";