From: Jesse Vincent Date: Mon, 3 Aug 2009 11:06:00 +0000 (+0100) Subject: Update the description of the 'system' function to point users at autodie X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1af1c0d6fc56624ceeee486b9d34f20643ac0ecd;p=p5sagit%2Fp5-mst-13.2.git Update the description of the 'system' function to point users at autodie pjf++ for complaining about the POD for system during his Klingon Programming talk at YAPC::EU 2009 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 3a345aa..9f95bb0 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -6474,6 +6474,9 @@ C, as described in L. Return value of -1 indicates a failure to start the program or an error of the wait(2) system call (inspect $! for the reason). +If you'd like to make C (and many other bits of Perl) die on error, +have a look at the L pragma. + Like C, C allows you to lie to a program about its name if you use the C syntax. Again, see L. @@ -6486,8 +6489,8 @@ value. system(@args) == 0 or die "system @args failed: $?" -You can check all the failure possibilities by inspecting -C<$?> like this: +If you'd like to manually inspect C's failure, u can check all +possible failure modes by inspecting C<$?> like this: if ($? == -1) { print "failed to execute: $!\n";