From: Gurusamy Sarathy Date: Fri, 28 Apr 2000 20:51:21 +0000 (+0000) Subject: note about compile failures and END blocks (from M.J.T. Guy) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=db517d64b5c27f7ee15c1fc304765222f07ff643;p=p5sagit%2Fp5-mst-13.2.git note about compile failures and END blocks (from M.J.T. Guy) p4raw-id: //depot/perl@6007 --- diff --git a/pod/perl56delta.pod b/pod/perl56delta.pod index 2117c70..377e448 100644 --- a/pod/perl56delta.pod +++ b/pod/perl56delta.pod @@ -1803,7 +1803,7 @@ cause silent failures. This has been fixed. Prior versions used to run BEGIN B END blocks when Perl was run in compile-only mode. Since this is typically not the expected behavior, END blocks are not executed anymore when the C<-c> switch -is used. +is used, or if compilation fails. See L for how to run things when the compile phase ends. diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 676940e..6bec46b 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -233,7 +233,7 @@ being blown out of the water by a signal--you have to trap that yourself (if you can).) You may have multiple C blocks within a file--they will execute in reverse order of definition; that is: last in, first out (LIFO). C blocks are not executed when you run perl with the -C<-c> switch. +C<-c> switch, or if compilation fails. Inside an C subroutine, C<$?> contains the value that the program is going to pass to C. You can modify C<$?> to change the exit