In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/16279618f4fddf32c6336e8b43059c0392284359?hp=270d3c5d82d37f92a0a41fc872cd9c9dfd2c1547>

- Log -----------------------------------------------------------------
commit 16279618f4fddf32c6336e8b43059c0392284359
Author: Ken Cotterill <kencotter...@netspace.net.au>
Date:   Thu Jun 1 13:09:39 2017 -0600

    PATCH: [perl #131142] Revise 'if' documentation
    
    This adds text about how to import when you want to 'use MODULE ()'

M       dist/if/if.pm

commit 89a7486bcd3ea0cb637fe1d82b1e5fa9ad55a10c
Author: Karl Williamson <k...@cpan.org>
Date:   Thu Jun 1 13:11:57 2017 -0600

    Add Ken Cotterill to AUTHORS

M       AUTHORS
-----------------------------------------------------------------------

Summary of changes:
 AUTHORS       |  1 +
 dist/if/if.pm | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/AUTHORS b/AUTHORS
index aa0a22a2fe..40c6393e00 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -692,6 +692,7 @@ KAWAI Takanori                      <gcd00...@nifty.ne.jp>
 Keedi Kim                      <ke...@cpan.org>
 Keith Neufeld                  <neuf...@fast.pvi.org>
 Keith Thompson                 <keith.s.thomp...@gmail.com>
+Ken Cotterill                   <kencotter...@netspace.net.au>
 Ken Estes                      <es...@ms.com>
 Ken Fox                                <k...@ford.com>
 Ken Hirsch                     <kenhir...@ftml.net>
diff --git a/dist/if/if.pm b/dist/if/if.pm
index 1985df4db1..d1cbd00f35 100644
--- a/dist/if/if.pm
+++ b/dist/if/if.pm
@@ -1,6 +1,6 @@
 package if;
 
-$VERSION = '0.0606';
+$VERSION = '0.0607';
 
 sub work {
   my $method = shift() ? 'import' : 'unimport';
@@ -50,6 +50,15 @@ The use of C<< => >> above provides necessary quoting of 
C<MODULE>.
 If you don't use the fat comma (eg you don't have any ARGUMENTS),
 then you'll need to quote the MODULE.
 
+If you wanted ARGUMENTS to be an empty list, i.e. have the effect of:
+
+    use MODULE ();
+
+you can't do this with the C<if> pragma; however, you can achieve
+exactly this effect, at compile time, with:
+
+    BEGIN { require MODULE if CONDITION }
+
 =head2 EXAMPLES
 
 The following line is taken from the testsuite for L<File::Map>:

--
Perl5 Master Repository

Reply via email to