summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod')
-rw-r--r--pod/perl5112delta.pod22
-rw-r--r--pod/perldiag.pod5
-rw-r--r--pod/perlfunc.pod8
-rw-r--r--pod/perlsyn.pod8
4 files changed, 43 insertions, 0 deletions
diff --git a/pod/perl5112delta.pod b/pod/perl5112delta.pod
index 4d524670b3..ca8c8096ff 100644
--- a/pod/perl5112delta.pod
+++ b/pod/perl5112delta.pod
@@ -52,6 +52,28 @@ boolean, string or number of objects. It is invoked when an object
appears on the right hand side of the C<=~> operator, or when it is
interpolated into a regexp. See L<overload>.
+=head2 Pluggable keywords
+
+Extension modules can now cleanly hook into the Perl parser to define new
+kinds of keyword-headed expression and compound statement. The syntax
+following the keyword is defined entirely by the extension. This allow
+a completely non-Perl sublanguage to be parsed inline, with the right
+ops cleanly generated.
+
+This feature is currently considered experimental, and using it to do
+anything interesting is difficult. Many necessary supporting facilities,
+such as the lexer and the pad system, can only be accessed through
+unsupported internal interfaces. It is intended that the Perl 5.13
+development cycle will see the addition of clean, supported interfaces
+for many of these functions. In Perl 5.12 most uses of pluggable keywords
+will be via L<Devel::Declare>.
+
+See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core source
+distribution also includes a new module L<XS::APItest::KeywordRPN>, which
+implements reverse Polish notation arithmetic via pluggable keywords.
+This module is mainly used for test purposes, and is not normally
+installed, but also serves as an example of how to use the new mechanism.
+
=head1 New Platforms
XXX List any platforms that this version of perl compiles on, that previous
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 3f0a78a3fe..db9a17c2fb 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -373,6 +373,11 @@ is not the same as
$var = 'myvar';
$sym = "mypack::$var";
+=item Bad plugin affecting keyword '%s'
+
+(F) An extension using the keyword plugin mechanism violated the
+plugin API.
+
=item Bad realloc() ignored
(S malloc) An internal routine called realloc() on something that had
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c440faa410..862e0ba73d 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -86,6 +86,14 @@ which return C<-1> on failure. Exceptions to this rule are C<wait>,
C<waitpid>, and C<syscall>. System calls also set the special C<$!>
variable on failure. Other functions do not, except accidentally.
+Extension modules can also hook into the Perl parser to define new
+kinds of keyword-headed expression. These may look like functions, but
+may also look completely different. The syntax following the keyword
+is defined entirely by the extension. If you are an implementor, see
+L<perlapi/PL_keyword_plugin> for the mechanism. If you are using such
+a module, see the module's documentation for details of the syntax that
+it defines.
+
=head2 Perl Functions by Category
X<function>
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod
index 5e80901b09..d5fc4a72c1 100644
--- a/pod/perlsyn.pod
+++ b/pod/perlsyn.pod
@@ -272,6 +272,14 @@ conditional is about to be evaluated again. Thus it can be used to
increment a loop variable, even when the loop has been continued via
the C<next> statement.
+Extension modules can also hook into the Perl parser to define new
+kinds of compound statement. These are introduced by a keyword which
+the extension recognises, and the syntax following the keyword is
+defined entirely by the extension. If you are an implementor, see
+L<perlapi/PL_keyword_plugin> for the mechanism. If you are using such
+a module, see the module's documentation for details of the syntax that
+it defines.
+
=head2 Loop Control
X<loop control> X<loop, control> X<next> X<last> X<redo> X<continue>