Current Path : /usr/local/lib/perl5/site_perl/5.8.9/mach/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/local/lib/perl5/site_perl/5.8.9/mach/mod_perl.pm |
package mod_perl; use 5.003_97; use strict; use DynaLoader (); BEGIN { $mod_perl::VERSION = "1.30"; } sub boot { my($class, $version) = @_; no strict 'refs'; *{$class.'::dl_load_flags'} = DynaLoader->can('dl_load_flags'); if ($ENV{MOD_PERL}) { (defined &{$class.'::bootstrap'} ? \&{$class.'::bootstrap'} : \&DynaLoader::bootstrap)-> ($class, $version); } } sub hook { my $hook = shift; return 1 if $hook =~ /^PerlHandler$/; (my $try = $hook) =~ s/^Perl//; $try =~ s/Handler$//; return Apache::perl_hook($try) > 0; } sub import { my $class = shift; return unless @_; if($_[0] =~ /^\d/) { $class->UNIVERSAL::VERSION(shift); } return unless $ENV{MOD_PERL}; for my $hook (@_) { require Apache; my $enabled = hook($hook); next if $enabled > 0; if($enabled < 0) { die "unknown mod_perl option `$hook'\n"; } else { (my $flag = $hook) =~ s/([A-Z])/_$1/g; $flag = uc $flag; die "`$hook' not enabled, rebuild mod_perl with PERL$flag=1\n"; } } } 1; __END__