📄 ch11_07.htm
字号:
<html><head><title>Apache:: Modules (Perl in a Nutshell, 2nd Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Stephen Spainhour" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="0596002416L" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="Perl in a Nutshell, 2nd Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Java and XSLT" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch11_06.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="part5.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">11.7. Apache:: Modules</h2><a name="INDEX-1740" /><p><a name="INDEX-1741" />Apache::Registry is the most commonlyused <em class="emphasis">mod_perl</em> module. But there are many more,all available on CPAN. The following table lists the Apache::*modules and the handler they're designed to be usedwith, but you should also check the<em class="emphasis">apache-modlist.html</em> file on CPAN for the latestlisting.</p><a name="ch11-3-fm2xml" /><table border="1" cellpadding="3"><tr><th><p>Module</p></th><th><p>Description</p></th></tr><tr><td><p><b class="emphasis-bold">PerlHandler</b></p></td></tr><tr><td><p>Apache::CallHandler</p></td><td><p>Maps filenames to subroutine calls</p></td></tr><tr><td><p>Apache::Dir</p></td><td><p>Controls directory indexing</p></td></tr><tr><td><p>Apache::Embperl</p></td><td><p>Embeds Perl code in HTML files</p></td></tr><tr><td><p>Apache::ePerl</p></td><td><p>Embedded Perl (ePerl) emulation</p></td></tr><tr><td><p>Apache::FTP</p></td><td><p>Emulates an FTP proxy</p></td></tr><tr><td><p>Apache::GzipChain</p></td><td><p>Compresses output from another handler</p></td></tr><tr><td><p>Apache::JavaScript</p></td><td><p>Generates JavaScript code</p></td></tr><tr><td><p>Apache::OutputChain</p></td><td><p>Chains multiple handlers via"filter" modules</p></td></tr><tr><td><p>Apache::PassFile</p></td><td><p>Sends files via OutputChain</p></td></tr><tr><td><p>Apache::Registry</p></td><td><p>Runs unaltered CGI scripts</p></td></tr><tr><td><p>Apache::RobotRules</p></td><td><p>Enforces <em class="emphasis">robots.txt</em> rules</p></td></tr><tr><td><p>Apache::Sandwich</p></td><td><p>Adds per-directory headers and footers</p></td></tr><tr><td><p>Apache::VhostSandwich</p></td><td><p>Adds headers and footers for virtual hosts</p></td></tr><tr><td><p>Apache::SSI</p></td><td><p>Implements server-side includes in Perl</p></td></tr><tr><td><p>Apache::Stage</p></td><td><p>Manages a document staging directory</p></td></tr><tr><td><p>Apache::WDB</p></td><td><p>Queries databases via DBI</p></td></tr><tr><td><p><b class="emphasis-bold">PerlHeaderParserHandler</b></p></td></tr><tr><td><p>Apache::AgentDeny</p></td><td><p>Denies abusive clients</p></td></tr><tr><td><p><b class="emphasis-bold">PerlAuthenHandler</b></p></td></tr><tr><td><p>Apache::Authen</p></td><td><p>Authenticates users</p></td></tr><tr><td><p>Apache::AuthCookie</p></td><td><p>Authenticates and authorizes users via cookies</p></td></tr><tr><td><p>Apache::AuthenDBI</p></td><td><p>Authenticates via Perl's DBI</p></td></tr><tr><td><p>Apache::AuthExpire</p></td><td><p>Expires authentication credentials</p></td></tr><tr><td><p>Apache::AuthenGSS</p></td><td><p>Authenticates users with Generic Security Service</p></td></tr><tr><td><p>Apache::AuthenLDAP</p></td><td><p>Authenticates users with LDAP</p></td></tr><tr><td><p>Apache::AuthNIS</p></td><td><p>Authenticates users with NIS</p></td></tr><tr><td><p>Apache::BasicCookieAuth</p></td><td><p>Accepts cookie or basic authentication credentials</p></td></tr><tr><td><p>Apache::DBILogin</p></td><td><p>Authenticates using a backend database</p></td></tr><tr><td><p>Apache::DCELogin</p></td><td><p>Authenticates within a DCE login context</p></td></tr><tr><td><p>Apache::AuthAny</p></td><td><p>Authenticates with any username/password</p></td></tr><tr><td><p><b class="emphasis-bold">PerlAuthzHandler</b></p></td></tr><tr><td><p>Apache::AuthCookie</p></td><td><p>Authenticates and authorizes via cookies</p></td></tr><tr><td><p>Apache::AuthzAge</p></td><td><p>Authorizes based on age</p></td></tr><tr><td><p>Apache::AuthzDCE</p></td><td><p>Authorizes based on DFS/DCE ACL</p></td></tr><tr><td><p>Apache::AuthzDBI</p></td><td><p>Authorizes groups via DBI</p></td></tr><tr><td><p>Apache::AuthNIS</p></td><td><p>Authenticates and authorizes via NIS</p></td></tr><tr><td><p>Apache::RoleAuthz</p></td><td><p>Role-based authorization</p></td></tr><tr><td><p><b class="emphasis-bold">PerlAccessHandler</b></p></td></tr><tr><td><p>Apache::AccessLimitNum</p></td><td><p>Limits user access by the number of requests</p></td></tr><tr><td><p>Apache::DayLimit</p></td><td><p>Limits access based on the day of the week</p></td></tr><tr><td><p>Apache::RobotLimit</p></td><td><p>Limits access of robots</p></td></tr><tr><td><p><b class="emphasis-bold">PerlTypeHandler</b></p></td></tr><tr><td><p>Apache::AcceptLanguage</p></td><td><p>Sends file types based on user's language preference</p></td></tr><tr><td><p><b class="emphasis-bold">PerlTransHandler</b></p></td></tr><tr><td><p>Apache::DynaRPC</p></td><td><p>Translates URIs into RPCs</p></td></tr><tr><td><p>Apache::Junction</p></td><td><p>Mounts remote web server namespace</p></td></tr><tr><td><p>Apache::LowerCaseGETs</p></td><td><p>Translates to lowercase URIs as needed</p></td></tr><tr><td><p>Apache::MsqlProxy</p></td><td><p>Translates URIs into mSQL queries</p></td></tr><tr><td><p>Apache::ProxyPassThru</p></td><td><p>Skeleton for vanilla proxy</p></td></tr><tr><td><p>Apache::ProxyCache</p></td><td><p>Caching proxy</p></td></tr><tr><td><p><b class="emphasis-bold">PerlFixupHandler</b></p></td></tr><tr><td><p>Apache::HttpEquiv</p></td><td><p>Converts HTML HTTP-EQUIV tags to HTTP headers</p></td></tr><tr><td><p>Apache::Timeit</p></td><td><p>Benchmarks Perl handlers</p></td></tr><tr><td><p><b class="emphasis-bold">PerlLogHandler</b></p></td></tr><tr><td><p>Apache::DumpHeaders</p></td><td><p>Displays HTTP transaction headers</p></td></tr><tr><td><p>Apache::Traffic</p></td><td><p>Logs the number of bytes transferred on a per-user basis</p></td></tr><tr><td><p>Apache::WatchDog</p></td><td><p>Looks for problematic URIs</p></td></tr><tr><td><p><b class="emphasis-bold">PerlChildInitHandler</b></p></td></tr><tr><td><p>Apache::Resource</p></td><td><p>Limits resources used by <em class="emphasis">httpd</em> children</p></td></tr><tr><td><p><b class="emphasis-bold">Server configuration</b></p></td></tr><tr><td><p>Apache::ConfigLDAP</p></td><td><p>Configures server via LDAP and <tt class="literal"><Perl></tt>sections</p></td></tr><tr><td><p>Apache::ConfigDBI</p></td><td><p>Configures server via DBI and <tt class="literal"><Perl></tt> sections</p></td></tr><tr><td><p>Apache::ModuleConfig</p></td><td><p>Interfaces to configuration API</p></td></tr><tr><td><p>Apache::PerlSections</p></td><td><p>Utilities for <tt class="literal"><Perl></tt> sections</p></td></tr><tr><td><p>Apache::httpd_conf</p></td><td><p>Methods to configure and run an <em class="emphasis">httpd</em></p></td></tr><tr><td><p>Apache::src</p></td><td><p>Methods for finding and reading bits of source</p></td></tr><tr><td><p><b class="emphasis-bold">Database</b></p></td></tr><tr><td><p>Apache::DBI</p></td><td><p>Manages persistent DBI connections</p></td></tr><tr><td><p>Apache::Sybase</p></td><td><p>Manages persistent DBlib connections</p></td></tr><tr><td><p>Apache::Mysql</p></td><td><p>Manages persistent mysql connections</p></td></tr><tr><td><p><b class="emphasis-bold">Interfaces and integration with various Apache C modules</b></p></td></tr><tr><td><p>Apache::Constants</p></td><td><p>Constants defined in <em class="emphasis">httpd.h</em></p></td></tr><tr><td><p>Apache::Include</p></td><td><p>Enables use of Apache::Registry scripts within SSI with<em class="emphasis">mod_include</em></p></td></tr><tr><td><p>Apache::Global</p></td><td><p>Gives access to server global variables</p></td></tr><tr><td><p>Apache::LogError</p></td><td><p>Gives an interface to <em class="emphasis">aplog_error</em></p></td></tr><tr><td><p>Apache::LogFile</p></td><td><p>Gives an interface to Apache's piped logs, etc.</p></td></tr><tr><td><p>Apache::Mime</p></td><td><p>Gives an interface to <em class="emphasis">mod_mime</em> functionality</p></td></tr><tr><td><p>Apache::Module</p></td><td><p>Gives an interface to Apache C module structures</p></td></tr><tr><td><p>Apache::Options</p></td><td><p>Imports Apache::Constants "options"</p></td></tr><tr><td><p>Apache::Scoreboard</p></td><td><p>Gives an interface to scoreboard API</p></td></tr><tr><td><p>Apache::Servlet</p></td><td><p>Gives an interface to the Java Servlet engine</p></td></tr><tr><td><p>Apache::Sfio</p></td><td><p>Gives an interface to<tt class="literal">r->connection->client->sf*</tt></p></td></tr><tr><td><p><b class="emphasis-bold">Development and debug tools</b></p></td></tr><tr><td><p>Apache::Debug</p></td><td><p>Provides debugging utilities to <em class="emphasis">mod_perl</em></p></td></tr><tr><td><p>Apache::DProf</p></td><td><p>Hooks Devel::DProf into <em class="emphasis">mod_perl</em></p></td></tr><tr><td><p>Apache::FakeRequest</p></td><td><p>Implements Apache methods offline</p></td></tr><tr><td><p>Apache::Peek</p></td><td><p>Emulates Devel::Peek for <em class="emphasis">mod_perl</em></p></td></tr><tr><td><p>Apache::SawAmpersand</p></td><td><p>Makes sure no one is using <tt class="literal">$&</tt>,<tt class="literal">$'</tt>, or <tt class="literal">$'</tt></p></td></tr><tr><td><p>Apache::StatINC</p></td><td><p>Reloads files that are <tt class="literal">use</tt> d or<tt class="literal">require</tt> d files when updated</p></td></tr><tr><td><p>Apache::Status</p></td><td><p>Gets information about loaded modules</p></td></tr><tr><td><p>Apache::Symbol</p></td><td><p>Supports symbols</p></td></tr><tr><td><p>Apache::test</p></td><td><p>Defines handy routines for <em class="emphasis">make test</em> scripts</p></td></tr><tr><td><p><b class="emphasis-bold">Miscellaneous</b></p></td></tr><tr><td><p>Apache::Byterun</p></td><td><p>Runs Perl bytecode modules</p></td></tr><tr><td><p>Apache::Mmap</p></td><td><p>Shares data via Mmap module</p></td></tr><tr><td><p>Apache::Persistent</p></td><td><p>Stores data via IPC::, DBI, or disk</p></td></tr><tr><td><p>Apache::PUT</p></td><td><p>Handler for the HTTP PUT method</p></td></tr><tr><td><p>Apache::RegistryLoader</p></td><td><p>Apache::Registry startup script loader</p></td></tr><tr><td><p>Apache::Safe</p></td><td><p>Adaptation of <em class="emphasis">safecgiperl</em></p></td></tr><tr><td><p>Apache::Session</p></td><td><p>Maintains client <-> <em class="emphasis">httpd</em> session/state</p></td></tr><tr><td><p>Apache::SIG</p></td><td><p>Signal handlers for <em class="emphasis">mod_perl</em></p></td></tr><tr><td><p>Apache::State</p></td><td><p>Powerful state engine</p></td></tr></table><p><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch11_06.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="part5.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">11.6. <Perl> Sections</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">V. Databases</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2002</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm"></map></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -