In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/17d155413b0e201ca149c3701d53539001559d4d?hp=0b721e491b9f3684d24ec056752af46db8ebb87c>

- Log -----------------------------------------------------------------
commit 17d155413b0e201ca149c3701d53539001559d4d
Author: Nicholas Clark <[email protected]>
Date:   Wed Feb 22 14:00:41 2012 +0100

    In perlfunc, don't have functions in "Misc" and a second category.
    
    dump, eval, evalbytes and wantarray are now only in "flow control".
    local, my, our and state are only in "scoping".
    prototype is now only in "misc". Whilst *prototypes* affect parsing, and
    hence indirectly flow control, the prototype function is for introspecting
    prototypes.

M       ext/Pod-Functions/t/Functions.t
M       pod/perlfunc.pod

commit dba7b06570fc6c08715b9cb0ae9b7662e7e6fee2
Author: Nicholas Clark <[email protected]>
Date:   Sun Feb 19 19:54:38 2012 +0100

    De-emphasise switch-related keywords in perlfunc.
    
    Move the 3 non-function keywords into the summary cross reference section
    at the end of perlfunc. Eliminate the examples which duplicate examples in
    perlsyn. Merge the remaining 2 keywords into the "control flow" group.
    Note that the switch feature is considered experimental.
    
    With these changes, `perldoc -f default`, `perldoc -f given` and
    `perldoc -f when` will still return a helpful result, and as before will
    refer the reader to perlsyn for full information.

M       ext/Pod-Functions/t/Functions.t
M       pod/perlfunc.pod

commit de9ddc2658f2fe67a3d6a86e14eb6634e2fb7e6f
Author: Nicholas Clark <[email protected]>
Date:   Sun Feb 19 18:33:22 2012 +0100

    In the perlfunc cross-reference sections, link to the section within a page.
    
    perlfunc now has a section cross referencing keywords documented elsewhere.
    Keywords are grouped by man page, and for most manpages, all the
    cross-referenced keywords are in the same section. Hence make the L<> links
    more specific by including the section.

M       pod/perlfunc.pod

commit 081753c830d198a217b6d919d68090aab769b724
Author: Nicholas Clark <[email protected]>
Date:   Sun Feb 19 16:49:44 2012 +0100

    DESTROY is documented in perlobj - correct the cross-reference in perlfunc.

M       pod/perlfunc.pod
-----------------------------------------------------------------------

Summary of changes:
 ext/Pod-Functions/t/Functions.t |   12 +--
 pod/perlfunc.pod                |  155 +++++++++++----------------------------
 2 files changed, 46 insertions(+), 121 deletions(-)

diff --git a/ext/Pod-Functions/t/Functions.t b/ext/Pod-Functions/t/Functions.t
index 0342a46..53da93a 100644
--- a/ext/Pod-Functions/t/Functions.t
+++ b/ext/Pod-Functions/t/Functions.t
@@ -31,7 +31,7 @@ is( $pkg_ref, $exp_ref, '@Pod::Functions::Type_Order 
exported' );
 # Check @Type_Order
 my @catagories = qw(
     String  Regexp  Math   ARRAY  LIST      HASH    I/O
-    Binary  File    Flow   Switch Namespace Misc    Process
+    Binary  File    Flow   Namespace Misc    Process
     Modules Objects Socket SysV   User      Network Time
 );
 
@@ -113,19 +113,15 @@ Functions for filehandles, files, or directories:
      stat, symlink, sysopen, umask, unlink, utime
 
 Keywords related to the control flow of your Perl program:
-     __FILE__, __LINE__, __PACKAGE__, __SUB__, caller,
+     __FILE__, __LINE__, __PACKAGE__, __SUB__, break, caller,
      continue, die, do, dump, eval, evalbytes, exit, goto,
-     last, next, prototype, redo, return, sub, wantarray
-
-Keywords related to the switch feature:
-     break, continue
+     last, next, redo, return, sub, wantarray
 
 Keywords related to scoping:
      caller, import, local, my, our, package, state, use
 
 Miscellaneous functions:
-     defined, dump, eval, evalbytes, formline, local, lock, my,
-     our, prototype, reset, scalar, state, undef, wantarray
+     defined, formline, lock, prototype, reset, scalar, undef
 
 Functions for processes and process groups:
      alarm, exec, fork, getpgrp, getppid, getpriority, kill,
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 08db117..460f6d3 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -191,10 +191,18 @@ X<control flow>
 
 =for Pod::Functions =Flow
 
-C<caller>, C<continue>, C<die>, C<do>,
+C<break>, C<caller>, C<continue>, C<die>, C<do>,
 C<dump>, C<eval>, C<evalbytes> C<exit>,
 C<__FILE__>, C<goto>, C<last>, C<__LINE__>, C<next>, C<__PACKAGE__>,
-C<prototype>, C<redo>, C<return>, C<sub>, C<__SUB__>, C<wantarray>
+C<redo>, C<return>, C<sub>, C<__SUB__>, C<wantarray>
+
+C<break> is available only if you enable the experimental C<"switch">
+feature or use the C<CORE::> prefix. The C<"switch"> feature also enables
+the C<default>, C<given> and C<when> statements, which are documented in
+L<perlsyn/"Switch Statements">. The C<"switch"> feature is enabled
+automatically with a C<use v5.10> (or higher) declaration in the current
+scope. In Perl v5.14 and earlier, C<continue> required the C<"switch">
+feature, like the other keywords.
 
 C<evalbytes> is only available with with the C<"evalbytes"> feature (see
 L<feature>) or if prefixed with C<CORE::>.  C<__SUB__> is only available
@@ -202,19 +210,6 @@ with with the C<"current_sub"> feature or if prefixed with 
C<CORE::>. Both
 the C<"evalbytes"> and C<"current_sub"> features are enabled automatically
 with a C<use v5.16> (or higher) declaration in the current scope.
 
-=item Keywords related to the switch feature
-
-=for Pod::Functions =Switch
-
-C<break>, C<continue>, C<default>, C<given>, C<when>
-
-Except for C<continue>, these are available only if you enable the
-C<"switch"> feature or use the C<CORE::> prefix.  See L<feature> and
-L<perlsyn/"Switch Statements">.  The C<"switch"> feature is enabled
-automatically with a C<use v5.10> (or higher) declaration in the current
-scope.  In Perl 5.14 and earlier, C<continue> required the C<"switch">
-feature, like the other keywords.
-
 =item Keywords related to scoping
 
 =for Pod::Functions =Namespace
@@ -229,9 +224,7 @@ with a C<use v5.10> (or higher) declaration in the current 
scope.
 
 =for Pod::Functions =Misc
 
-C<defined>, C<dump>, C<eval>, C<evalbytes>,
-C<formline>, C<local>, C<lock>, C<my>, C<our>, C<prototype>,
-C<reset>, C<scalar>, C<state>, C<undef>, C<wantarray>
+C<defined>, C<formline>, C<lock>, C<prototype>, C<reset>, C<scalar>, C<undef>
 
 =item Functions for processes and process groups
 X<process> X<pid> X<process id>
@@ -307,9 +300,10 @@ C<gmtime>, C<localtime>, C<time>, C<times>
 =for Pod::Functions =!Non-functions
 
 C<and>, C<AUTOLOAD>, C<BEGIN>, C<CHECK>, C<cmp>, C<CORE>, C<__DATA__>,
-C<DESTROY>, C<else>, C<elseif>, C<elsif>, C<END>, C<__END__>, C<eq>, C<for>,
-C<foreach>, C<ge>, C<gt>, C<if>, C<INIT>, C<le>, C<lt>, C<ne>, C<not>, C<or>,
-C<UNITCHECK>, C<unless>, C<until>, C<while>, C<x>, C<xor>
+C<default>, C<DESTROY>, C<else>, C<elseif>, C<elsif>, C<END>, C<__END__>,
+C<eq>, C<for>, C<foreach>, C<ge>, C<given>, C<gt>, C<if>, C<INIT>, C<le>,
+C<lt>, C<ne>, C<not>, C<or>, C<UNITCHECK>, C<unless>, C<until>, C<when>,
+C<while>, C<x>, C<xor>
 
 =back
 
@@ -1281,15 +1275,6 @@ before you call dbmopen():
 
 Portability issues: L<perlport/dbmopen>.
 
-=item default BLOCK
-
-=for Pod::Functions !RT #108848
-
-Within a C<foreach> or a C<given>, a C<default> BLOCK acts like a C<when>
-that's always true.  Only available after Perl 5.10, and only if the
-C<switch> feature has been requested or if the keyword is prefixed with
-C<CORE::>.  See L</when>.
-
 =item defined EXPR
 X<defined> X<undef> X<undefined>
 
@@ -2811,33 +2796,6 @@ Here's an example to test whether Nagle's algorithm is 
enabled on a socket:
 
 Portability issues: L<perlport/getsockopt>.
 
-=item given EXPR BLOCK
-X<given>
-
-=item given BLOCK
-
-=for Pod::Functions !RT #108848
-
-C<given> is analogous to the C<switch>
-keyword in other languages.  C<given>
-and C<when> are used in Perl to implement C<switch>/C<case> like statements.
-Only available after Perl 5.10.  For example:
-
-    use v5.10;
-    given ($fruit) {
-        when (/apples?/) {
-            print "I like apples."
-        }
-        when (/oranges?/) {
-            print "I don't like oranges."
-        }
-        default {
-            print "I don't like anything"
-        }
-    }
-
-See L<perlsyn/"Switch Statements"> for detailed information.
-
 =item glob EXPR
 X<glob> X<wildcard> X<filename, expansion> X<expand>
 
@@ -8962,56 +8920,6 @@ See L<perlvar> for details on setting C<%SIG> entries 
and for more
 examples.  See the Carp module for other kinds of warnings using its
 carp() and cluck() functions.
 
-=item when EXPR BLOCK
-X<when>
-
-=item when BLOCK
-
-=for Pod::Functions !RT #108848
-
-C<when> is analogous to the C<case>
-keyword in other languages.  Used with a
-C<foreach> loop or the experimental C<given> block, C<when> can be used in
-Perl to implement C<switch>/C<case> like statements.  Available as a
-statement after Perl 5.10 and as a statement modifier after 5.14.  
-Here are three examples:
-
-    use v5.10;
-    foreach (@fruits) {
-        when (/apples?/) {
-            say "I like apples."
-        }
-        when (/oranges?/) {
-            say "I don't like oranges."
-        }
-        default {
-            say "I don't like anything"
-        }
-    }
-
-    # require 5.14 for when as statement modifier
-    use v5.14;
-    foreach (@fruits) {
-       say "I like apples."        when /apples?/; 
-       say "I don't like oranges." when /oranges?;
-        default { say "I don't like anything" }
-    }
-
-    use v5.10;
-    given ($fruit) {
-        when (/apples?/) {
-            say "I like apples."
-        }
-        when (/oranges?/) {
-            say "I don't like oranges."
-        }
-        default {
-            say "I don't like anything"
-        }
-    }
-
-See L<perlsyn/"Switch Statements"> for detailed information.
-
 =item write FILEHANDLE
 X<write>
 
@@ -9064,7 +8972,7 @@ L<perlop/"Quote and Quote-like Operators">.
 
 =item __END__
 
-These keywords are documented in L<perldata>.
+These keywords are documented in L<perldata/"Special Literals">.
 
 =back
 
@@ -9076,15 +8984,23 @@ These keywords are documented in L<perldata>.
 
 =item CHECK
 
-=item DESTROY
-
 =item END
 
 =item INIT
 
 =item UNITCHECK
 
-These keywords are documented in L<perlmod>.
+These compile phase keywords are documented in L<perlmod/"BEGIN, UNITCHECK, 
CHECK, INIT and END">.
+
+=back
+
+=head3 perlobj
+
+=over
+
+=item DESTROY
+
+This method keyword is documented in L<perlobj/"Destructors">.
 
 =back
 
@@ -9128,7 +9044,7 @@ These operators are documented in L<perlop>.
 
 =item AUTOLOAD
 
-These are documented in L<perlsub>.
+This keyword is documented in L<perlsub/"Autoloading">.
 
 =back
 
@@ -9152,7 +9068,20 @@ These are documented in L<perlsub>.
 
 =item while
 
-These flow-control keywords are documented in L<perlsyn>.
+These flow-control keywords are documented in L<perlsyn/"Compound Statements">.
+
+=back
+
+=over
+
+=item default
+
+=item given
+
+=item when
+
+These flow-control keywords related to the experimental switch feature are
+documented in L<perlsyn/"Switch Statements"> .
 
 =back
 

--
Perl5 Master Repository

Reply via email to