perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-docs/src/docs/2.0/devel/core_explained core_explained.pod
Date Mon, 31 Dec 2001 12:13:51 GMT
stas        01/12/31 04:13:51

  Modified:    src/docs/2.0/devel/core_explained core_explained.pod
  Log:
  - add notes on how to import new constants and enums from ap/apr
  
  Revision  Changes    Path
  1.11      +28 -0     modperl-docs/src/docs/2.0/devel/core_explained/core_explained.pod
  
  Index: core_explained.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/devel/core_explained/core_explained.pod,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- core_explained.pod	21 Dec 2001 16:54:20 -0000	1.10
  +++ core_explained.pod	31 Dec 2001 12:13:51 -0000	1.11
  @@ -435,7 +435,35 @@
   
   In all other cases use normal functions.
   
  +=head1 Importing Constants and Enums into Perl API
   
  +To I<import> httpd and APR constants and enums into Perl API, edit
  +I<lib/Apache/ParseSource.pm>. To add a new type of C<DEFINE> constants
  +adjust the C<%defines_wanted> variable, for C<enums> modify
  +C<%enums_wanted>.
  +
  +For example to import all C<DEFINE>s starting with C<APR_FLOCK_> add:
  +
  +  my %defines_wanted = (
  +      ...
  +      APR => {
  +          ...
  +          flock     => [qw{APR_FLOCK_}],
  +          ...
  +      },
  +  );
  +
  +When deciding which constants are to be exported, the regular
  +expression will be used, so in our example all matches
  +C</^APR_FLOCK_/> will be imported into the Perl API.
  +
  +For example to import an I<filter_type_e> C<enum> for Apache, add:
  +
  +  my %enums_wanted = (
  +      Apache => { map { $_, 1 } qw(filter_type) },
  +  );
  +
  +Notice that I<_e> part at the end of the enum name has gone.
   
   =head1 Maintainers
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message