stas 01/11/29 08:26:32 Modified: src/devel/core_explained core_explained.pod Log: - document the BOOT= directive in the map file Revision Changes Path 1.8 +36 -3 modperl-docs/src/devel/core_explained/core_explained.pod Index: core_explained.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/devel/core_explained/core_explained.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- core_explained.pod 2001/11/22 15:43:58 1.7 +++ core_explained.pod 2001/11/29 16:26:32 1.8 @@ -156,7 +156,40 @@ =item * C<BOOT> -META: complete +The C<BOOT> directive tells the XS generator, whether to add the boot +function to the autogenerated XS file or not. If the value of C<BOOT> +is not true or it's simply not declared, the boot function won't be +added. + +If the value is true, a boot function will be added to the XS file. +Note, that this function is not declared in the map file. + +The boot function name must be constructed from three parts: + + 'mpxs_' . MODULE . '_BOOT' + +where C<MODULE> is the one declared with C<MODULE=> in the map file. + +For example if we want to have an XS boot function for a class +C<APR::IO>, we create this function in I<xs/APR/IO/APR__IO.h>: + + static void mpxs_APR__IO_BOOT(pTHX) + { + /* boot code here */ + } + +and now we add the C<BOOT=1> declaration to the +I<xs/maps/modperl_functions.map> file: + + MODULE=APR::IO PACKAGE=APR::IO BOOT=1 + +When I<make xs_generate> is run (after running I<make source_scan>), +it autogenerates I<Wrap/APR/IO/IO.xs> and amongst other things will +include: + + BOOT: + mpxs_APR__IO_BOOT(aTHXo); + =item * C<ISA> @@ -164,8 +197,8 @@ =back -Every function definition is declared on a separate line, using the -following format: +Every function definition is declared on a separate line (use C<\> if +the line is too long), using the following format: C function name | Dispatch function name | Argspec | Perl alias
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]