home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / ParseSource.pm < prev    next >
Encoding:
Perl POD Document  |  2001-10-07  |  1.2 KB  |  50 lines

  1. package ModPerl::ParseSource;
  2.  
  3. use strict;
  4. use Config ();
  5. use Apache::ParseSource ();
  6.  
  7. our @ISA = qw(Apache::ParseSource);
  8. our $VERSION = '0.01';
  9.  
  10. sub includes {
  11.     my $self = shift;
  12.     my $dirs = $self->SUPER::includes;
  13.     return [
  14.             '.', qw(xs src/modules/perl),
  15.             @$dirs,
  16.             "$Config::Config{archlibexp}/CORE",
  17.            ];
  18. }
  19.  
  20. sub include_dirs { '.' }
  21.  
  22. sub find_includes {
  23.     my $self = shift;
  24.     my $includes = $self->SUPER::find_includes;
  25.     #filter/sort
  26.     my @wanted  = grep { /mod_perl\.h/ } @$includes;
  27.     push @wanted, grep { m:xs/modperl_xs_: } @$includes;
  28.     push @wanted, grep { m:xs/[AM]: } @$includes;
  29.     \@wanted;
  30. }
  31.  
  32. my $prefixes = join '|', qw(modperl mpxs mp_xs);
  33. my $prefix_re = qr{^($prefixes)_};
  34. sub wanted_functions { $prefix_re }
  35.  
  36. sub write_functions_pm {
  37.     my $self = shift;
  38.     my $file = shift || 'FunctionTable.pm';
  39.     my $name = shift || 'ModPerl::FunctionTable';
  40.     $self->SUPER::write_functions_pm($file, $name);
  41. }
  42.  
  43. for my $method (qw(get_constants get_structs write_structs_pm get_structs)) {
  44.     no strict 'refs';
  45.     *$method = sub { die __PACKAGE__ . "->$method not implemented" };
  46. }
  47.  
  48. 1;
  49. __END__
  50.