summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-01-23 22:44:52 +0100
committerNicholas Clark <nick@ccl4.org>2012-02-18 13:16:51 +0100
commit8d9a42761c02030eee049d59f4bb4539b6955149 (patch)
tree66a556b26bae31d39b8164f7fff7461f144f9300
parent3017d6ff27eb1c05142eea0fd45b5a74d2018e1a (diff)
downloadperl-8d9a42761c02030eee049d59f4bb4539b6955149.tar.gz
Teach Pod::Functions about 'Keywords related to the switch feature'.
Commit 0d863452f5cac863 in Dec 2005 added the switch feature, along with documentation in perlfunc.pod, but did not update Pod::Functions. Again, tweak the golden results in the test to match these changes.
-rw-r--r--lib/Pod/Functions.pm8
-rw-r--r--lib/Pod/t/Functions.t9
2 files changed, 13 insertions, 4 deletions
diff --git a/lib/Pod/Functions.pm b/lib/Pod/Functions.pm
index 1227f56313..3712203311 100644
--- a/lib/Pod/Functions.pm
+++ b/lib/Pod/Functions.pm
@@ -80,6 +80,7 @@ our %Type_Description = (
'Regexp' => 'Regular expressions and pattern matching',
'Socket' => 'Low-level socket functions',
'String' => 'Functions for SCALARs or strings',
+ 'Switch' => 'Keywords related to the switch feature',
'SysV' => 'System V interprocess communication functions',
'Time' => 'Time-related functions',
'User' => 'Fetching user and group info',
@@ -97,6 +98,7 @@ our @Type_Order = qw{
Binary
File
Flow
+ Switch
Namespace
Misc
Process
@@ -164,7 +166,7 @@ chroot File make directory new root for path lookups
close I/O close file (or pipe or socket) handle
closedir I/O close directory handle
connect Socket connect to a remote socket
-continue Flow optional trailing block in a while or foreach
+continue Flow,Switch optional trailing block in a while or foreach
cos Math cosine function
crypt String one-way passwd-style encryption
dbmclose Objects,I/O breaks binding on a tied dbm file
@@ -360,3 +362,7 @@ wantarray Misc,Flow get void vs scalar vs list context of current subroutine cal
warn I/O print debugging info
write I/O print a picture record
y/// String transliterate a string
+break Switch Break out of a C<given()> block
+default Switch XXX RT #108848
+given Switch XXX RT #108848
+when Switch XXX RT #108848
diff --git a/lib/Pod/t/Functions.t b/lib/Pod/t/Functions.t
index 30f270de73..b874a893d9 100644
--- a/lib/Pod/t/Functions.t
+++ b/lib/Pod/t/Functions.t
@@ -33,9 +33,9 @@ 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 Namespace Misc Process Modules
- Objects Socket SysV User Network Time
+ String Regexp Math ARRAY LIST HASH I/O
+ Binary File Flow Switch Namespace Misc Process
+ Modules Objects Socket SysV User Network Time
);
ok( eq_array( \@Type_Order, \@catagories ),
@@ -115,6 +115,9 @@ Keywords related to the control flow of your Perl program:
caller, continue, die, do, dump, eval, exit, goto, last,
next, prototype, redo, return, sub, wantarray
+Keywords related to the switch feature:
+ break, continue, default, given, when
+
Keywords related to scoping:
caller, import, local, my, our, package, use