summaryrefslogtreecommitdiff
path: root/pod/perlmod.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-24 17:32:20 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-24 17:32:20 +0000
commit14218588221b08417dacfb8f157681c6b381b73f (patch)
tree56817d24552ce5a29fc77965ab137d11b73fc29a /pod/perlmod.pod
parent9263d47b7ba3c92b743ac884edfaa80847325f4d (diff)
downloadperl-14218588221b08417dacfb8f157681c6b381b73f.tar.gz
more pod updates from Tom Christiansen; regen perltoc
p4raw-id: //depot/perl@3462
Diffstat (limited to 'pod/perlmod.pod')
-rw-r--r--pod/perlmod.pod12
1 files changed, 6 insertions, 6 deletions
diff --git a/pod/perlmod.pod b/pod/perlmod.pod
index 53426d3203..0031d6e0e6 100644
--- a/pod/perlmod.pod
+++ b/pod/perlmod.pod
@@ -212,7 +212,7 @@ This also has implications for the use of the SUPER:: qualifier
=head2 Package Constructors and Destructors
-There are two special subroutine definitions that function as package
+Three special subroutines act as package
constructors and destructors. These are the C<BEGIN>, C<INIT>, and
C<END> routines. The C<sub> is optional for these routines.
@@ -225,6 +225,11 @@ files in time to be visible to the rest of the file. Once a C<BEGIN>
has run, it is immediately undefined and any code it used is returned to
Perl's memory pool. This means you can't ever explicitly call a C<BEGIN>.
+Similar to C<BEGIN> blocks, C<INIT> blocks are run just before the
+Perl runtime begins execution. For example, the code generators
+documented in L<perlcc> make use of C<INIT> blocks to initialize
+and resolve pointers to XSUBs.
+
An C<END> subroutine is executed as late as possible, that is, when
the interpreter is being exited, even if it is exiting as a result of
a die() function. (But not if it's polymorphing into another program
@@ -244,11 +249,6 @@ implemented (and subject to change, since its inconvenient at best),
both C<BEGIN> and<END> blocks are run when you use the B<-c> switch
for a compile-only syntax check, although your main code is not.
-Similar to C<BEGIN> blocks, C<INIT> blocks are run just before the
-Perl runtime begins execution. For example, the code generators
-documented in L<perlcc> make use of C<INIT> blocks to initialize
-and resolve pointers to XSUBs.
-
=head2 Perl Classes
There is no special class syntax in Perl, but a package may act