From: Zefram Date: Mon, 30 Nov 2009 10:42:14 +0000 (+0100) Subject: Document if.pm in perlfunc X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c362798e2bfee6dd58e97b97c7f3aa37c2c6af9f;p=p5sagit%2Fp5-mst-13.2.git Document if.pm in perlfunc --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 540b723..188647c 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -7060,6 +7060,15 @@ block scope (like C or C, unlike ordinary modules, which import symbols into the current package (which are effective through the end of the file). +Because C takes effect at compile time, it doesn't respect the +ordinary flow control of the code being compiled. In particular, putting +a C inside the false branch of a conditional doesn't prevent it +from being processed. If a module or pragma needs to be loaded only +conditionally, this can be done using the L pragma: + + use if $] < 5.008, "utf8"; + use if WANT_WARNINGS, warnings => qw(all); + There's a corresponding C command that unimports meanings imported by C, i.e., it calls C instead of C. It behaves exactly as C does with respect to VERSION, an