summaryrefslogtreecommitdiff
path: root/pod/perlguts.pod
diff options
context:
space:
mode:
authorPaul Johnson <paul@pjcj.net>2001-07-10 23:53:28 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-11 00:30:56 +0000
commit1ba7f8516c9ddf9fe5f546213fbde0eab8b73e41 (patch)
tree137e16f2a2f201ade95f9b0e8180a5c45af3c9ee /pod/perlguts.pod
parenta52fe01cbb9500344d9d57ae4b6c54d10afdf370 (diff)
downloadperl-1ba7f8516c9ddf9fe5f546213fbde0eab8b73e41.tar.gz
[DOC PATCH] Pluggable runops
Message-ID: <20010710215328.B26577@pjcj.net> p4raw-id: //depot/perl@11268
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r--pod/perlguts.pod17
1 files changed, 17 insertions, 0 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index e4d4a14372..323d456935 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -1667,6 +1667,23 @@ additional complications for conditionals). These optimizations are
done in the subroutine peep(). Optimizations performed at this stage
are subject to the same restrictions as in the pass 2.
+=head2 Pluggable runops
+
+The compile tree is executed in a runops function. There are two runops
+functions in F<run.c>. C<Perl_runops_debug> is used with DEBUGGING and
+C<Perl_runops_standard> is used otherwise. For fine control over the
+execution of the compile tree it is possible to provide your own runops
+function.
+
+It's probably best to copy one of the existing runops functions and
+change it to suit your needs. Then, in the BOOT section of your XS
+file, add the line:
+
+ PL_runops = my_runops;
+
+This function should be as efficient as possible to keep your programs
+running as fast as possible.
+
=head1 Examining internal data structures with the C<dump> functions
To aid debugging, the source file F<dump.c> contains a number of